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
()
| 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) |
| 81 | func ClockSequence() int { |
| 82 | defer timeMu.Unlock() |
| 83 | timeMu.Lock() |
| 84 | return clockSequence() |
| 85 | } |
| 86 | |
| 87 | func clockSequence() int { |
| 88 | if clockSeq == 0 { |
nothing calls this directly
no test coverage detected