Skip to content

Latest commit

 

History

History
31 lines (19 loc) · 604 Bytes

nano_sleep.md

File metadata and controls

31 lines (19 loc) · 604 Bytes

mx_nanosleep

NAME

nanosleep - high resolution sleep

SYNOPSIS

#include <magenta/syscalls.h>

mx_status_t mx_nanosleep(mx_time_t nanoseconds);

DESCRIPTION

nanosleep() suspends the calling thread execution for at least nanoseconds nanoseconds. The special value MX_TIME_INFINITE suspends the calling thread execution indefinitely. The value 0 immediately yields the thread.

RETURN VALUE

nanosleep() returns NO_ERROR on success.

ERRORS

BUGS

Currently the smallest nonzero sleep is 1 millisecond. Intervals smaller than that are equivalent to 1ms.