7 releases
0.1.6 | Oct 10, 2024 |
---|---|
0.1.5 | Oct 9, 2024 |
#607 in Asynchronous
29 downloads per month
32KB
781 lines
Hires timers for tokio.
This is a drop-in replacement of tokio::time
.
The API is a 1:1 replication. Please refer to the doc there.
Timers with the highest possible resolution from the operating system
are used. The feature time
of tokio is not used and is not required.
Sub-millisecond granularity is achieved with:
timerfd
in Linux (and Android).kqueue
withEVFILT_TIMER
in *BSD and Apple's Darwin; specifically,NOTE_MACHTIME
is used in Darwin to obtain the similar resolution to GCD.CreateWaitableTimerEx
withCREATE_WAITABLE_TIMER_HIGH_RESOLUTION
in Windows.
lib.rs
:
Hires timers for tokio.
This is a drop-in replacement of tokio::time
.
The API is a 1:1 replication. Please refer to the doc there.
Timers with the highest possible resolution from the operating system
are used. The feature time
of tokio is not used and is not required.
Sub-millisecond granularity is achieved with:
timerfd
in Linux (and Android).kqueue
withEVFILT_TIMER
in *BSD and Apple's Darwin; specifically,NOTE_MACHTIME
is used in Darwin to obtain the similar resolution to GCD.CreateWaitableTimerEx
withCREATE_WAITABLE_TIMER_HIGH_RESOLUTION
in Windows.
Dependencies
~2–41MB
~617K SLoC