test,unix: fix logic error in test runner
Fix the logic that guards against the system clock jumping back in time. Fixes: https://github.com/libuv/libuv/issues/667 PR-URL: https://github.com/libuv/libuv/pull/670 Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
This commit is contained in:
parent
a0057d96be
commit
bcecc3dda3
@ -226,7 +226,7 @@ int process_wait(process_info_t* vec, int n, int timeout) {
|
||||
tv = timebase;
|
||||
for (;;) {
|
||||
/* Check that gettimeofday() doesn't jump back in time. */
|
||||
assert(tv.tv_sec == timebase.tv_sec ||
|
||||
assert(tv.tv_sec > timebase.tv_sec ||
|
||||
(tv.tv_sec == timebase.tv_sec && tv.tv_usec >= timebase.tv_usec));
|
||||
|
||||
elapsed_ms =
|
||||
|
||||
Loading…
Reference in New Issue
Block a user