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
()
| 74 | // random clock sequence is generated the first time a clock sequence is |
| 75 | // requested by ClockSequence, GetTime, or NewUUID. (section 4.2.1.1) |
| 76 | func ClockSequence() int { |
| 77 | defer timeMu.Unlock() |
| 78 | timeMu.Lock() |
| 79 | return clockSequence() |
| 80 | } |
| 81 | |
| 82 | func clockSequence() int { |
| 83 | if clockSeq == 0 { |
nothing calls this directly
no test coverage detected
searching dependent graphs…