Defer waits.

Add sanity check
This commit is contained in:
Henrik Rydgård committed 2023-12-18 17:15:56 +01:00
1 parent 97e0f6dc94
commit e1f1af6223
2 files changed
+11 -5

No files matched your search

+3 -1
View File
@@ -39,7 +39,9 @@ void WaitUntil(double now, double timestamp) {
}
#else
const double left = timestamp - now;
usleep((long)(left * 1000000));
if (left > 0.0) {
usleep((long)(left * 1000000));
}
#endif
}