Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
clock: add NewTimer #242
Conversation
rogpeppe
referenced this pull request
in juju/testing
Sep 26, 2016
Merged
implement Clock.NewTimer #108
| @@ -25,5 +25,17 @@ func (wallClock) After(d time.Duration) <-chan time.Time { | ||
| } | ||
| func (wallClock) AfterFunc(d time.Duration, f func()) Timer { |
| + return wallTimer{time.AfterFunc(d, f)} | ||
| +} | ||
| + | ||
| +func (wallClock) NewTimer(d time.Duration) Timer { |
| + *time.Timer | ||
| +} | ||
| + | ||
| +func (t wallTimer) Chan() <-chan time.Time { |
|
$$merge$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju-utils |
|
Build failed: Tests failed |
|
$$merge$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju-utils |
jujubot
merged commit 51f3696
into
juju:master
Sep 26, 2016
added a commit
to juju/testing
that referenced
this pull request
Sep 26, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
rogpeppe commentedSep 26, 2016
•
Edited 1 time
-
rogpeppe
Sep 26, 2016
This allows mock clocks to use timers in the usual way.
This is associated with a companion branch in juju
testing (juju/testing#108) which needs
this as a dependency update.