Skip to content

feat: custom time::Instant with support of fiber_clock API

Егор Ивков requested to merge fiber-clock into master

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:

  1. Saturating operations added. We discovered the need for them in picodata.
  2. API duplicating itself is removed. In our case saturating_duration_since and duration_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 Егор Ивков

Merge request reports