Description
Is your feature request related to a problem? Please describe.
On linux, tokio currently delegates to std::sync::Condvar::wait_timeout and epoll_wait. These functions use CLOCK_MONOTONIC. Therefore, time spent in system sleep does not count towards tokio timers.
Sometimes you want to schedule an operation periodically. For example, poll an external resource once an hour. CLOCK_MONOTONIC is not suitable for this usecase. After the system wakes up from sleep, you most likely want to poll the external resource immediately if a wall clock hour has elapsed.
Describe the solution you'd like
Provide some way to create CLOCK_BOOTTIME timers.
Describe alternatives you've considered
This can be implemented as an external library. But tokio already contains the infrastructure to work with timers.
Additional context
I assume timeouts are also affected by sleep not counting towards them.
On Windows, std::sync::Condvar::wait_timeout behaves the same way. However, due to rust-lang/rust#79462, any spurious wakeup will cause the timer to expire.