Atlas › Test

TestNewRealClock_AfterFunc

Exact test identity: go.temporal.io/server/common/clock/TestNewRealClock_AfterFunc

Package
go.temporal.io/server/common/clock
Suite / test hierarchy
TestNewRealClock_AfterFunc
Test
TestNewRealClock_AfterFunc
Introduced at
time_source.go ×1 Frontier kind: Joint frontier
Covered ranges
2
Covered lines
6
Covered files
1

Covered source

Expand a file to inspect source; the > gutter marks covered lines.

go.temporal.io/server/common/clock/time_source.go 6 covered LOC · 2 ranges

Open complete file

31
32 // NewRealTimeSource returns a timeSource that uses the real wall timeSource time.
33 > func NewRealTimeSource() RealTimeSource { time_source.go
34 > return RealTimeSource{}
35 > }
36
37 // Now returns the current time, with the location set to UTC.
46
47 // AfterFunc is a pass-through to time.AfterFunc.
48 > func (ts RealTimeSource) AfterFunc(d time.Duration, f func()) Timer { time_source.go
49 > return time.AfterFunc(d, f)
50 > }
51
52 // NewTimer is a pass-through to time.NewTimer.