Skip to content

Commit

Permalink
move variable declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
alanzhao1 committed May 15, 2024
1 parent 643902d commit 7810c6e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion code/sys/sys_unix.c
Original file line number Diff line number Diff line change
Expand Up @@ -549,11 +549,12 @@ void Sys_Sleep( int msec )
}
else
{
struct timespec req;

// With nothing to select() on, we can't wait indefinitely
if( msec < 0 )
msec = 10;

struct timespec req;
req.tv_sec = msec/1000;
req.tv_nsec = (msec%1000)*1000000;
nanosleep(&req, NULL);
Expand Down

0 comments on commit 7810c6e

Please sign in to comment.