From: Robert Griesemer Date: Wed, 1 Oct 2014 23:44:52 +0000 (-0700) Subject: time: A Timer must be properly created before use (documentation). X-Git-Tag: go1.4beta1~215 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=bc89e8c575be08ef261a4d76db14f7f65a6da923;p=gostls13.git time: A Timer must be properly created before use (documentation). Fixes #8776. LGTM=bradfitz R=rsc, bradfitz CC=golang-codereviews https://golang.org/cl/145710043 --- diff --git a/src/time/sleep.go b/src/time/sleep.go index 33c349de46..61660d14ff 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