Module timestamp_generator

Source

Structs§

MonotonicTimestampGenerator
Monotonic timestamp generator. Guarantees monotonicity of timestamps. If system clock will not provide an increased timestamp, then the timestamp will be artificially increased. If the config is provided and the clock skew is bigger than warning_threshold (by default 1 second), then the user will be warned about the skew repeatedly, with warning_interval provided in the settings (by default 1 second). Remember that this generator only guarantees monotonicity within one instance of this struct! If you create multiple instances the monotonicity guarantee becomes void.
SimpleTimestampGenerator
Basic timestamp generator. Provides no guarantees, if system clock returns time before UNIX epoch it panics.

Traits§

TimestampGenerator
Trait used to represent a timestamp generator