| Crates.io | tokio-hrtime |
| lib.rs | tokio-hrtime |
| version | 0.1.6 |
| created_at | 2024-10-07 02:05:40.049892+00 |
| updated_at | 2024-10-10 15:31:37.867009+00 |
| description | Hires timers for tokio |
| homepage | |
| repository | https://github.com/ruihe774/tokio-hrtime |
| max_upload_size | |
| id | 1399570 |
| size | 31,944 |
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.