Discover Packages
go.temporal.io/server
common
clock
hybrid_logical_clock
package
Version:
v1.24.0-m2.5
Opens a new window with list of versions in this module.
Published: Apr 16, 2024
License: MIT
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Compare 2 Clocks, returns 0 if a == b, -1 if a > b, 1 if a < b
Equal returns whether two Clocks are equal
Greater returns true if a is greater than b
Greater returns true if a is greater than b
Since returns time.Since(UTC(c))
UTC returns a Time from a Clock in millisecond resolution. The Time's Location is set to UTC.
Max returns the maximum of two Clocks
Min returns the minimum of two Clocks
Next generates the next clock timestamp given the current clock.
HybridLogicalClock requires the previous clock to ensure that time doesn't move backwards and the next clock is
monotonically increasing.
Zero generates a zeroed logical clock for the cluster ID.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.