Skip to content

Commit 38e88c1

Browse files
committed
Add sanity check
1 parent e801876 commit 38e88c1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Core/FrameTiming.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ void WaitUntil(double now, double timestamp) {
3939
}
4040
#else
4141
const double left = timestamp - now;
42-
usleep((long)(left * 1000000));
42+
if (left > 0.0) {
43+
usleep((long)(left * 1000000));
44+
}
4345
#endif
4446
}
4547

0 commit comments

Comments
 (0)