Trio lets you set timeouts as either relative or absolute times, and it always stores them internally as absolute times. For example, move_on_after(10)
is just a convenient shorthand for move_on_at(trio.current_time() + 10)
, and sleep(10)
is a shorthand for sleep_until(trio.current_time() + 10)
. So if you’re in a situation where you want to e.g. set a timer for every 10 seconds, you can do that by using the absolute time API: sleep_until(start_time + i*10)
.