Documentation ¶
Index ¶
- func AddPhysicalDurationOnTs(ts uint64, duration time.Duration) uint64
- func CalculateDuration(ts1, ts2 typeutil.Timestamp) int64
- func ComposeTS(physical, logical int64) uint64
- func ComposeTSByTime(physical time.Time, logical int64) uint64
- func GetCurrentTime() typeutil.Timestamp
- func Mod24H(ts uint64) uint64
- func ParseAndFormatHybridTs(ts uint64) string
- func ParseHybridTs(ts uint64) (int64, int64)
- func ParseTS(ts uint64) (time.Time, uint64)
- func PhysicalTime(ts uint64) time.Time
- func SubByNow(ts uint64) int64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddPhysicalDurationOnTs ¶
AddPhysicalDurationOnTs adds physical interval on ts
func CalculateDuration ¶
CalculateDuration returns the number of milliseconds obtained by subtracting ts2 from ts1.
func ComposeTSByTime ¶
ComposeTSByTime returns a timestamp composed of physical time.Time and logical time
func GetCurrentTime ¶
GetCurrentTime returns the current timestamp
func ParseAndFormatHybridTs ¶
ParseAndFormatHybridTs parses the ts and returns its human-readable format.
func ParseHybridTs ¶
ParseHybridTs parses the ts to (physical, logical), physical part is of utc-timestamp format.
func PhysicalTime ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.