Skip to content

ts: runtime: add delay_for_at_least

The time driver for the threadshare runtime assigns the timer entries to the nearest throttling time frame so that the timer fires as close as possible to the expected instant. This means that the timer might fire before or after the expected instant (at most wait / 2 away).

In some cases, we don't want the timer to fire early. The new function delay_for_at_least ensures that the timer is assigned to the time frame after the expected instant.

The time driver entries have no clues whether they operate within a throttling runtime and what the max throttling duration is. For these reasons, it seems easier to implement the logic for delay_for_at_least directly in the threadshare runtime.

Fixes #169 (closed)

Edited by Sebastian Dröge

Merge request reports