Brian | 3afd6fc | 2014-04-02 20:41:49 -0700 | [diff] [blame^] | 1 | #ifndef AOS_COMMON_UTIL_PHASED_LOOP_H_ |
| 2 | #define AOS_COMMON_UTIL_PHASED_LOOP_H_ |
brians | 343bc11 | 2013-02-10 01:53:46 +0000 | [diff] [blame] | 3 | |
| 4 | #include <time.h> |
| 5 | #include <string> |
| 6 | |
| 7 | namespace aos { |
| 8 | namespace time { |
| 9 | |
| 10 | // Will not be accurate if ms isn't a factor of 1000. |
| 11 | // offset is in us. |
| 12 | void PhasedLoopXMS(int ms, int offset); |
| 13 | // offset is in us. |
| 14 | inline void PhasedLoop10MS(int offset) { PhasedLoopXMS(10, offset); } |
| 15 | |
| 16 | } // namespace time |
| 17 | } // namespace aos |
| 18 | |
Brian | 3afd6fc | 2014-04-02 20:41:49 -0700 | [diff] [blame^] | 19 | #endif // AOS_COMMON_UTIL_PHASED_LOOP_H_ |