File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change 59
59
60
60
#include <stdlib.h>
61
61
62
+ /* define internal timer to 10 milliseconds */
63
+ #define ITIMER_TICK 10000
64
+
65
+ /* try to synchronize with system time every 5 seconds */
66
+ #define TIMER_SYNC_TICKS 1000000
67
+
68
+ /* synchronize if drift is greater than internal timer tick */
69
+ #define TIMER_MAX_DRIFT_TICKS ITIMER_TICK
70
+
62
71
/* list with all the registered timers */
63
72
static struct os_timer * timer_list = NULL ;
64
73
Original file line number Diff line number Diff line change @@ -44,18 +44,10 @@ typedef long long stime_t;
44
44
typedef void (timer_function )(unsigned int ticks , void * param );
45
45
typedef void (utimer_function )(utime_t uticks , void * param );
46
46
47
- /* define internal timer to 10 milliseconds */
48
- #define ITIMER_TICK 10000
49
-
50
47
#define TIMER_FLAG_IS_UTIMER (1<<0)
51
48
#define TIMER_FLAG_SKIP_ON_DELAY (1<<1)
52
49
#define TIMER_FLAG_DELAY_ON_DELAY (1<<2)
53
50
54
- /* try to synchronize with system time every 5 seconds */
55
- #define TIMER_SYNC_TICKS 5000000
56
- /* synchronize if drift is greater than internal timer tick */
57
- #define TIMER_MAX_DRIFT_TICKS ITIMER_TICK
58
-
59
51
struct os_timer {
60
52
/* unique ID in the list of timer handlers - not really used */
61
53
unsigned short id ;
You can’t perform that action at this time.
0 commit comments