summaryrefslogtreecommitdiff
path: root/src/time
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2014-10-01 16:44:52 -0700
committerRobert Griesemer <gri@golang.org>2014-10-01 16:44:52 -0700
commit10ae267445b507d1733782927888d160d2973d58 (patch)
tree833a865366a7f9a11fc19a82e798813e0c94cab0 /src/time
parent1e04c88a8f5749e619fa8f429f840498da297ed9 (diff)
downloadgo-10ae267445b507d1733782927888d160d2973d58.tar.gz
time: A Timer must be properly created before use (documentation).
Fixes issue 8776. LGTM=bradfitz R=rsc, bradfitz CC=golang-codereviews https://codereview.appspot.com/145710043
Diffstat (limited to 'src/time')
-rw-r--r--src/time/sleep.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/time/sleep.go b/src/time/sleep.go
index 33c349de4..61660d14f 100644
--- a/src/time/sleep.go
+++ b/src/time/sleep.go
@@ -43,6 +43,7 @@ func stopTimer(*runtimeTimer) bool
// The Timer type represents a single event.
// When the Timer expires, the current time will be sent on C,
// unless the Timer was created by AfterFunc.
+// A Timer must be created with NewTimer or AfterFunc.
type Timer struct {
C <-chan Time
r runtimeTimer