New scheduled queue, for scheduling calls to callables

This commit is contained in:
Alvaro Saurin committed 2015-06-10 22:56:38 +02:00
1 parent 5ce4b25f38
commit d6a9fc57cc
3 files changed
+235

No files matched your search

+3
View File
@@ -432,6 +432,9 @@ func newMockedClock() *mockedClock {
return &mockedClock{clock.NewMock()}
}
// Note: moving the clock forward does not take into account the data that could
// be waiting in channels. So your code should not depend on the channels
// for creating new timers. Otherwise, time travelling will not be reliable...
func (clk *mockedClock) Forward(secs int) {
Debug.Printf(">>>>>>> Moving clock forward %d seconds - Time traveling >>>>>>>", secs)
clk.Add(time.Duration(secs) * time.Second)