hax/src/posix/time.c
/**
 * Sleep an interval given in microseocnds.
 *   @usec: The number of microseconds to sleep.
 */
Sleep an interval given in microseocnds.
@usec: The number of microseconds to sleep.
Sleep an interval given in microseocnds . @usec : The number of microseconds to sleep .
void sys_usleep(uint64_t usec)
{
	struct timespec rem, req = { usec / 1000000, (usec % 1000000) * 1000 };
	while(nanosleep(&req, &rem) < 0) {
		if(errno != EINTR)
			fatal("Failed to sleep (%d). %s.", errno, strerror(errno));
		req = rem;
	}
}
void sys_usleep ( uint64_t usec ) { struct timespec rem , req = { usec / 1000000 , ( usec % 1000000 ) * 1000 } ; while ( nanosleep ( & req , & rem ) < 0 ) { if ( errno != EINTR ) fatal ( " " , errno , strerror ( errno ) ) ; req = rem ; } }
Sleep an interval given in microseocnds.
Sleep an interval given in microseocnds .