Allow longer sleeps than a second.

This commit is contained in:
Nikos Mavrogiannopoulos
2013-03-04 18:52:47 +01:00
parent ce3bf1c22a
commit 2674af5aec

View File

@@ -60,6 +60,11 @@ static void ms_sleep(unsigned ms)
tv.tv_sec = 0;
tv.tv_nsec = ms * 1000 * 1000;
while(tv.tv_nsec >= 1000000000) {
tv.tv_nsec -= 1000000000;
tv.tv_sec++;
}
nanosleep(&tv, NULL);
}