Does vTaskdelay(1) delay up to one tick or circa one tick?

rtel wrote on Monday, January 28, 2019:

There is only one answer to this:

Time resolution is set by the tick frequency. If, for example, you have
a tick every 1ms, then vTaskDelay() will block for 0.00001ms if you call
vTaskDelay( 1 ) immediately before the next tick interrupt, or 0.99999ms
if you call vTaskDelay( 1 ) immediately after the next tick interrupt.
To do anything else would take a lot of math (even floating point math)
and (non portable) clock manipulation to get sub tick frequency
interrupts within the kernel so the run time hit would not be tolerable
to most applications.

1 Like