Atlas › Test

TestNewRealClock_Now

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

Package
go.temporal.io/server/common/clock
Suite / test hierarchy
TestNewRealClock_Now
Test
TestNewRealClock_Now
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.
38 > func (ts RealTimeSource) Now() time.Time { time_source.go
39 > return time.Now().UTC()
40 > }
41
42 // Since returns the time elapsed since t