Commit bc89e8c5 authored by Robert Griesemer's avatar Robert Griesemer

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
parent 7e8218ae
...@@ -43,6 +43,7 @@ func stopTimer(*runtimeTimer) bool ...@@ -43,6 +43,7 @@ func stopTimer(*runtimeTimer) bool
// The Timer type represents a single event. // The Timer type represents a single event.
// When the Timer expires, the current time will be sent on C, // When the Timer expires, the current time will be sent on C,
// unless the Timer was created by AfterFunc. // unless the Timer was created by AfterFunc.
// A Timer must be created with NewTimer or AfterFunc.
type Timer struct { type Timer struct {
C <-chan Time C <-chan Time
r runtimeTimer r runtimeTimer
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment