github.com/ydb-platform/ydb-go-sdk/v3@v3.57.0/testutil/time.go (about) 1 package testutil 2 3 import ( 4 "time" 5 ) 6 7 type StubTicker struct { 8 d time.Duration 9 f func(time.Time) 10 } 11 12 func (s *StubTicker) Reset(d time.Duration, f func(time.Time)) { 13 s.d = d 14 s.f = f 15 } 16 17 func (s *StubTicker) Emit(t time.Time) { 18 s.f(t) 19 } 20 21 func (s StubTicker) Destroy() {}