Skip to content

Commit

Permalink
win32/pthread: fix calculation error in pthread_cond_timedwait
Browse files Browse the repository at this point in the history
closes #12699
  • Loading branch information
sfan5 committed Oct 21, 2023
1 parent 490af95 commit 97afea4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion osdep/win32/pthread.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ int pthread_cond_timedwait(pthread_cond_t *restrict cond,
timeout_ms = INFINITE;
} else if (abstime->tv_sec >= ts.tv_sec) {
int64_t msec = (abstime->tv_sec - ts.tv_sec) * INT64_C(1000) +
(abstime->tv_nsec - ts.tv_nsec) / INT64_C(10000000);
(abstime->tv_nsec - ts.tv_nsec) / INT64_C(1000000);
if (msec > ULONG_MAX) {
timeout_ms = INFINITE;
} else if (msec > 0) {
Expand Down

0 comments on commit 97afea4

Please sign in to comment.