Zen API
 All Classes Files Functions Variables Typedefs Friends Macros Modules Pages
kStatus kThread_Sleep ( k64u  duration)

Causes the current thread to yield control for approximately the specified duration.

The duration specified in this function is approximate. Sleep duration is governed by the underlying operating system, and may be affected by kernel timer resolution or thread scheduling policies. In general, if CPU utilization is low (quiet system), then sleep duration is most often +/- 1 kernel timer tick. At the time of this writing, most desktop operating systems have a 10 ms kernel timer resolution, while most embedded systems have a 1-10 ms kernel timer resolution.

If sleep duration must be constrained to be at least the specified duration, consider using kThread_SleepAtLeast.

Parameters
durationApproximate time to sleep, in microseconds
Returns
Operation status.