tokio-hrtime

Crates.iotokio-hrtime
lib.rstokio-hrtime
version0.1.6
sourcesrc
created_at2024-10-07 02:05:40.049892
updated_at2024-10-10 15:31:37.867009
descriptionHires timers for tokio
homepage
repositoryhttps://github.com/ruihe774/tokio-hrtime
max_upload_size
id1399570
size31,944
Rui He (ruihe774)

documentation

README

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 with EVFILT_TIMER in *BSD and Apple's Darwin; specifically, NOTE_MACHTIME is used in Darwin to obtain the similar resolution to GCD.
  • CreateWaitableTimerEx with CREATE_WAITABLE_TIMER_HIGH_RESOLUTION in Windows.
Commit count: 49

cargo fmt