Atlas › Test
TestNewRealClock_NewTimer
Exact test identity: go.temporal.io/server/common/clock/TestNewRealClock_NewTimer
- Package
go.temporal.io/server/common/clock
- Suite / test hierarchy
TestNewRealClock_NewTimer
- Test
TestNewRealClock_NewTimer
- Introduced at
- time_source.go ×1 Frontier kind: Joint frontier
- Covered ranges
- 2
- Covered lines
- 7
- Covered files
- 1
Co-introduced tests
1 other test enter at the same concept.
Covered source
Expand a file to inspect source; the > gutter marks covered lines.
go.temporal.io/server/common/clock/time_source.go 7 covered LOC · 2 ranges
Open complete file
31
32
// NewRealTimeSource returns a timeSource that uses the real wall timeSource time.
34
>
return RealTimeSource{}
35
>
}
36
37
// Now returns the current time, with the location set to UTC.
51
52
// NewTimer is a pass-through to time.NewTimer.
53
>
func (ts RealTimeSource) NewTimer(d time.Duration) (<-chan time.Time, Timer) {
time_source.go
54
>
t := time.NewTimer(d)
55
>
return t.C, t
56
>
}