9 lines
225 B
Plaintext
9 lines
225 B
Plaintext
|
inline int
|
||
|
usleep(useconds_t microseconds)
|
||
|
{
|
||
|
struct timespec ts;
|
||
|
ts.tv_sec = microseconds / (useconds_t)1000000;
|
||
|
ts.tv_nsec = (long)(microseconds % (useconds_t)1000000) * 1000L;
|
||
|
return nanosleep(&ts, NULL);
|
||
|
}
|