MCPcopy
hub / github.com/google/uuid / ClockSequence

Function ClockSequence

time.go:81–85  ·  view source on GitHub ↗

ClockSequence returns the current clock sequence, generating one if not already set. The clock sequence is only used for Version 1 UUIDs. The uuid package does not use global static storage for the clock sequence or the last time a UUID was generated. Unless SetClockSequence is used, a new random

()

Source from the content-addressed store, hash-verified

79// random clock sequence is generated the first time a clock sequence is
80// requested by ClockSequence, GetTime, or NewUUID. (section 4.2.1.1)
81func ClockSequence() int {
82 defer timeMu.Unlock()
83 timeMu.Lock()
84 return clockSequence()
85}
86
87func clockSequence() int {
88 if clockSeq == 0 {

Callers

nothing calls this directly

Calls 1

clockSequenceFunction · 0.85

Tested by

no test coverage detected