Struct lolid::Timestamp [−][src]
pub struct Timestamp { /* fields omitted */ }
Expand description
Timestamp for use with v1
algorithm.
Implementations
Creates timestamp from raw parts, as per RFC4122.
ticks
is number of 100-nanoseconds intervals elapsed since 15 Oct 1582 00:00:00.00.counter
is value used to differentiate between timestamps generated to avoid collision in case of rapid generation.
Creates instance from unix timestamp, namely it takes seconds and subsec_nanos.
Note it doesn’t set counter, if needed it must be set manually
Creates instance using current time, namely calculating duration since epoch.
Note it doesn’t set counter, if needed it must be set manually
Only available when std
feature is enabled.
Sets counter to further avoid chance of collision between timestamps.
Useful if clock is not guaranteed to be monotonically increasing. Otherwise there is no benefit in setting the counter.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Timestamp
impl UnwindSafe for Timestamp
Blanket Implementations
Mutably borrows from an owned value. Read more