diff options
Diffstat (limited to 'Godeps/_workspace/src/github.com/pborman/uuid/time.go')
-rw-r--r-- | Godeps/_workspace/src/github.com/pborman/uuid/time.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Godeps/_workspace/src/github.com/pborman/uuid/time.go b/Godeps/_workspace/src/github.com/pborman/uuid/time.go index 7ebc9bef1..eedf24219 100644 --- a/Godeps/_workspace/src/github.com/pborman/uuid/time.go +++ b/Godeps/_workspace/src/github.com/pborman/uuid/time.go @@ -23,7 +23,7 @@ const ( ) var ( - mu sync.Mutex + timeMu sync.Mutex lasttime uint64 // last time we returned clock_seq uint16 // clock sequence for this run @@ -43,8 +43,8 @@ func (t Time) UnixTime() (sec, nsec int64) { // clock sequence as well as adjusting the clock sequence as needed. An error // is returned if the current time cannot be determined. func GetTime() (Time, uint16, error) { - defer mu.Unlock() - mu.Lock() + defer timeMu.Unlock() + timeMu.Lock() return getTime() } @@ -75,8 +75,8 @@ func getTime() (Time, uint16, error) { // ClockSequence, GetTime, or NewUUID. (section 4.2.1.1) sequence is generated // for func ClockSequence() int { - defer mu.Unlock() - mu.Lock() + defer timeMu.Unlock() + timeMu.Lock() return clockSequence() } @@ -90,8 +90,8 @@ func clockSequence() int { // SetClockSeq sets the clock sequence to the lower 14 bits of seq. Setting to // -1 causes a new sequence to be generated. func SetClockSequence(seq int) { - defer mu.Unlock() - mu.Lock() + defer timeMu.Unlock() + timeMu.Lock() setClockSequence(seq) } |