fix incorrect timeout microsecond computation
Chris Lee @klee93
1 files changed,
2 insertions(+),
1 deletions(-)
jump to
M
src/util/timer.c
→
src/util/timer.c
@@ -131,7 +131,8 @@ next_timer->enabled_ ? "on" : "off",
next_timer->expiration_time_ms_, next_timer->period_ms_); result.tv_sec = duration / 1000; - result.tv_usec = 1000 * (duration - result.tv_sec); + duration -= result.tv_sec * 1000; + result.tv_usec = 1000 * duration; return &result; }