Provides APIs for tasks to sleep for specified time durations.
sleepfunction delays the current task for a given number of ticks.
sleep_untilfunction delays the current task until a specific moment in the future.
sleep_periodicfunction allows for tasks to be delayed for periodic intervals of time and can be used to implement a period task.
TODO: use regular time-keeping abstractions like Duration and Instant.
Returns the current time in ticks
Update the current tick count Used as a callback in the systick handler
Blocks the current task by putting it to sleep for
Blocks the current task for a fixed time
period, which starts from the given
Blocks the current task by putting it to sleep until a specific tick count is reached,
Remove all tasks that have been delayed but are able to be unblocked now, the current tick count is provided by the system’s interrupt tick count.