Skip to content
Commit a3e5af95 authored by Peter Mitsis's avatar Peter Mitsis Committed by Fabio Baltieri
Browse files

kernel: Update k_sleep() and k_usleep() return values



Updates both the k_sleep() and k_usleep() return values so that if
the thread was woken up prematurely, they will return the time left
to sleep rounded up to the nearest millisecond (for k_sleep) or
microsecond (for k_usleep) instead of rounding down. This removes
ambiguity should there be a non-zero number of remaining ticks
that correlate to a time of less than 1 millisecond or 1 microsecond.

Signed-off-by: default avatarPeter Mitsis <peter.mitsis@intel.com>
parent 093c7f41
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment