Skip to content

Commit

Permalink
Update red_test.c
Browse files Browse the repository at this point in the history
  • Loading branch information
ArthurKetels authored Nov 9, 2020
1 parent 4b4cdc2 commit 2c1b9b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/win32/red_test/red_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ void add_timespec(struct timespec *ts, int64 addtime)
sec = (addtime - nsec) / NSEC_PER_SEC;
ts->tv_sec += sec;
ts->tv_nsec += nsec;
if ( ts->tv_nsec > NSEC_PER_SEC )
if ( ts->tv_nsec >= NSEC_PER_SEC )
{
nsec = ts->tv_nsec % NSEC_PER_SEC;
ts->tv_sec += (ts->tv_nsec - nsec) / NSEC_PER_SEC;
Expand Down

0 comments on commit 2c1b9b2

Please sign in to comment.