feat: custom time::Instant with support of fiber_clock API
Closes #114 (closed)
Provides a custom Instant
type similar to std. The introduction of a new type allows us to return it from fiber::clock
and fiber::time
functions.
The interface is mostly the same as in std::time::Instant
, the only differences are:
- Saturating operations added. We discovered the need for them in picodata.
- API duplicating itself is removed. In our case
saturating_duration_since
andduration_since
would behave identically, so one was removed. In Rust std depending on the target OS they might differ, but generally should not.
All uses of std Instant were replaced with our custom implementation.
Edited by Егор Ивков