class MonotonicTimestampGenerator
Augments
TimestampGenerator
Constructor
A timestamp generator that guarantees monotonically increasing timestamps and logs warnings when timestamps drift in the future.
Date
has millisecond precision and client timestamps require microsecond precision. This generator
keeps track of the last generated timestamp, and if the current time is within the same millisecond as the last,
it fills the microsecond portion of the new timestamp with the value of an incrementing counter.
Methods
getDate
()Returns the current time in milliseconds since UNIX epoch