Skip to content

Commit

Permalink
fixing unix timeouts handling ("timer_tests.short_interval" failure) (w…
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksey-sergey authored and wjwwood committed Nov 29, 2016
1 parent 4d69fb2 commit 02dfff7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/impl/unix.cc
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ MillisecondTimer::MillisecondTimer (const uint32_t millis)
int64_t tv_nsec = expiry.tv_nsec + (millis * 1e6);
if (tv_nsec >= 1e9) {
int64_t sec_diff = tv_nsec / static_cast<int> (1e9);
expiry.tv_nsec %= static_cast<int>(1e9);
expiry.tv_nsec = tv_nsec % static_cast<int>(1e9);
expiry.tv_sec += sec_diff;
} else {
expiry.tv_nsec = tv_nsec;
Expand Down

0 comments on commit 02dfff7

Please sign in to comment.