Discover Packages
go.temporal.io/server
common
clock
hybrid_logical_clock
package
Version:
v1.23.0-rc0
Opens a new window with list of versions in this module.
Published: Sep 15, 2023
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))
SincePtr returns time.Since(UTCFromPtr(c))
UTC returns a Time from a Clock in millisecond resolution. The Time's Location is set to UTC.
UTC returns a Time from a *Clock in millisecond resolution. The Time's Location is set to UTC.
If the argument is nil, it returns the Unix epoch.
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.
Ptr returns a pointer to a Clock (to ease inlining the APIs in this package).
Zero generates a zeroed logical clock for the cluster ID.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.