MCPcopy
hub / github.com/uber-go/zap / Clock

Interface Clock

zapcore/clock.go:30–37  ·  zapcore/clock.go::Clock

Clock is a source of time for logged entries.

Source from the content-addressed store, hash-verified

28
29// Clock is a source of time for logged entries.
30type Clock interface {
31 // Now returns the current local time.
32 Now() time.Time
33
34 // NewTicker returns *time.Ticker that holds a channel
35 // that delivers "ticks" of a clock.
36 NewTicker(time.Duration) *time.Ticker
37}
38
39// systemClock implements default Clock that uses system time.
40type systemClock struct{}

Callers 11

checkMethod · 0.65
TestJSONEmptyConfigFunction · 0.65
writeSequenceFunction · 0.65
TestNopCoreFunction · 0.65
NowMethod · 0.65
initializeMethod · 0.65
NewTickerMethod · 0.65

Implementers 2

systemClockzapcore/clock.go
MockClockinternal/ztest/clock.go

Calls

no outgoing calls

Tested by

no test coverage detected