#include "c.h"
#include <time.h>
Go to the source code of this file.
◆ pg_usleep()
void pg_usleep |
( |
long |
microsec | ) |
|
Definition at line 41 of file pgsleep.c.
46 struct timespec delay;
48 delay.tv_sec = microsec / 1000000L;
49 delay.tv_nsec = (microsec % 1000000L) * 1000;
50 (void) nanosleep(&delay, NULL);
52 SleepEx((microsec < 500 ? 1 : (microsec + 500) / 1000), FALSE);