Documentation ¶
Overview ¶
Package externalclock provides a clock implementation for external time sources.
Index ¶
- type Clock
- func (g *Clock) After(duration time.Duration) <-chan time.Time
- func (g *Clock) AfterFunc(d time.Duration, f func()) clock.Timer
- func (g *Clock) NewTicker(d time.Duration) clock.Ticker
- func (g *Clock) NewTimer(d time.Duration) *Timer
- func (g *Clock) Now() time.Time
- func (g *Clock) NowProto() *timestamppb.Timestamp
- func (g *Clock) NumberOfTriggers() int
- func (g *Clock) Run(ctx context.Context) errordeprecated
- func (g *Clock) SetTimestamp(t time.Time)
- func (g *Clock) Since(t time.Time) time.Duration
- func (g *Clock) Sleep(d time.Duration)
- type Timer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Clock ¶
func (*Clock) NewTimer ¶
NewTimer creates a new Timer that will send the current time on its channel after at least duration d.
func (*Clock) NowProto ¶
func (g *Clock) NowProto() *timestamppb.Timestamp
func (*Clock) NumberOfTriggers ¶
func (*Clock) SetTimestamp ¶
Click to show internal directories.
Click to hide internal directories.