Skip to content

Commit

Permalink
Fix erroneous parameter to usleep.
Browse files Browse the repository at this point in the history
Was passing milliseconds, should pass microseconds.
  • Loading branch information
gwsw committed Mar 5, 2024
1 parent 1422880 commit a16053e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion os.c
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ public void sleep_ms(int ms)
nanosleep(&t, NULL);
#else
#if HAVE_USLEEP
usleep(ms);
usleep(ms * 1000);
#else
sleep(ms / 1000 + (ms % 1000 != 0));
#endif
Expand Down

0 comments on commit a16053e

Please sign in to comment.