mirror of
https://github.com/falk-werner/webfuse
synced 2024-10-27 20:34:10 +00:00
fixes error in msleep utility
This commit is contained in:
parent
d46e844e1e
commit
8ef8f7a18e
@ -10,7 +10,7 @@ void msleep(long millis)
|
|||||||
long const msecs_per_nsec = (1000 * 1000);
|
long const msecs_per_nsec = (1000 * 1000);
|
||||||
|
|
||||||
long const seconds = millis / secs_per_msec;
|
long const seconds = millis / secs_per_msec;
|
||||||
long const nanos = (millis & secs_per_msec) * msecs_per_nsec;
|
long const nanos = (millis % secs_per_msec) * msecs_per_nsec;
|
||||||
|
|
||||||
struct timespec timeout = { seconds, nanos };
|
struct timespec timeout = { seconds, nanos };
|
||||||
while (0 != nanosleep(&timeout, &timeout));
|
while (0 != nanosleep(&timeout, &timeout));
|
||||||
|
Loading…
Reference in New Issue
Block a user