mirror of
https://github.com/golang/go.git
synced 2025-05-25 17:31:22 +00:00
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
This commit is contained in:
parent
7e8218aedd
commit
bc89e8c575
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user