Skip to content

Commit

Permalink
wutstdc++: Fix __wut_cond_timedwait
Browse files Browse the repository at this point in the history
  • Loading branch information
GaryOderNichts authored and fincs committed Sep 27, 2022
1 parent b417b8f commit 575b889
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libraries/wutstdc++/wut_gthread_cond.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "wut_gthread.h"
#include "../wutnewlib/wut_clock.h"

#include <sys/errno.h>
#include <sys/time.h>
Expand Down Expand Up @@ -60,7 +61,7 @@ __wut_cond_timedwait(OSCondition *cond, OSMutex *mutex,

OSTime time = OSGetTime();
OSTime timeout =
OSSecondsToTicks(abs_timeout->tv_sec) +
OSSecondsToTicks(abs_timeout->tv_sec - EPOCH_DIFF_SECS(WIIU_OSTIME_EPOCH_YEAR)) +
OSNanosecondsToTicks(abs_timeout->tv_nsec);

// Already timed out!
Expand Down

0 comments on commit 575b889

Please sign in to comment.