pub fn fsleep(delta: Delta)
Expand description
Sleeps for a given duration at least.
Equivalent to the C side fsleep()
, flexible sleep function,
which automatically chooses the best sleep method based on a duration.
delta
must be within [0, i32::MAX]
microseconds;
otherwise, it is erroneous behavior. That is, it is considered a bug
to call this function with an out-of-range value, in which case the function
will sleep for at least the maximum value in the range and may warn
in the future.
The behavior above differs from the C side fsleep()
for which out-of-range
values mean “infinite timeout” instead.
This function can only be used in a nonatomic context.