[][src]Type Definition ratelimit_meter::instant::TimeSource

type TimeSource = Instant;

The default time representation in use by rate limiters. To override it, pass a different P type argument to the algorithm and rate limiter bucket.

When using std

The default time source is Instant when using std.

When using no_std

In situations where std is not available, the fallback default time source is Duration. It only allows comparisons to a relative, fixed, point in time. Users are expected to determine that point in time and stick to it.