(seq int)
| 95 | } |
| 96 | |
| 97 | func setClockSequence(seq int) { |
| 98 | if seq == -1 { |
| 99 | var b [2]byte |
| 100 | randomBits(b[:]) // clock sequence |
| 101 | seq = int(b[0])<<8 | int(b[1]) |
| 102 | } |
| 103 | oldSeq := clockSeq |
| 104 | clockSeq = uint16(seq&0x3fff) | 0x8000 // Set our variant |
| 105 | if oldSeq != clockSeq { |
| 106 | lasttime = 0 |
| 107 | } |
| 108 | } |
| 109 | |
| 110 | // Time returns the time in 100s of nanoseconds since 15 Oct 1582 encoded in |
| 111 | // uuid. The time is only defined for version 1, 2, 6 and 7 UUIDs. |
no test coverage detected