Skip to content

Commit

Permalink
Use signed type for computing timer drift
Browse files Browse the repository at this point in the history
(cherry picked from commit f8c11e1)
  • Loading branch information
rvlad-patrascu committed Oct 4, 2016
1 parent a9bdf7b commit 70e1d6b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion timer.c
Expand Up @@ -489,7 +489,7 @@ static void run_timer_process_jif(void)
struct timeval o_tv;
struct timeval tv;
struct timeval sync_ts, last_ts;
utime_t interval, drift;
stime_t interval, drift;
utime_t last_ticks, last_sync = 0;

o_tv.tv_sec = 0;
Expand Down
1 change: 1 addition & 0 deletions timer.h
Expand Up @@ -39,6 +39,7 @@
#define timer_h

typedef unsigned long long utime_t;
typedef long long stime_t;

typedef void (timer_function)(unsigned int ticks, void* param);
typedef void (utimer_function)(utime_t uticks, void* param);
Expand Down

0 comments on commit 70e1d6b

Please sign in to comment.