MCPcopy Index your code
hub / github.com/beevik/timerqueue / PeekFirst

Method PeekFirst

queue.go:96–101  ·  view source on GitHub ↗

PeekFirst returns the next timer to be scheduled and the time at which it is scheduled to run. It does not modify the contents of the timer queue.

()

Source from the content-addressed store, hash-verified

94// at which it is scheduled to run. It does not modify the contents
95// of the timer queue.
96func (q *Queue) PeekFirst() (t Timer, tm time.Time) {
97 if len(q.heap) > 0 {
98 return q.heap[0].timer, q.heap[0].time
99 }
100 return nil, time.Time{}
101}
102
103// Advance executes OnTimer callbacks for all timers scheduled to be
104// run before the time 'tm'. Executed timers are removed from the

Callers 2

TestEmptyQueueFunction · 0.80
TestQueueFunction · 0.80

Calls

no outgoing calls

Tested by 2

TestEmptyQueueFunction · 0.64
TestQueueFunction · 0.64