MCPcopy Create free account
hub / github.com/git-bug/git-bug / NewMemClock

Function NewMemClock

util/lamport/mem_clock.go:53–57  ·  view source on GitHub ↗

NewMemClock create a new clock with the value 1. Value 0 is considered as invalid.

()

Source from the content-addressed store, hash-verified

51// NewMemClock create a new clock with the value 1.
52// Value 0 is considered as invalid.
53func NewMemClock() *MemClock {
54 return &MemClock{
55 counter: 1,
56 }
57}
58
59// NewMemClockWithTime create a new clock with a value.
60func NewMemClockWithTime(time uint64) *MemClock {

Callers 3

GetOrCreateClockMethod · 0.92
TestMemClockFunction · 0.85
NewPersistedClockFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestMemClockFunction · 0.68