]> Cypherpunks repositories - gostls13.git/commitdiff
time: explicitely mention Tickers have to be stopped
authorPatrick Mézard <patrick@mezard.eu>
Mon, 24 Feb 2014 15:18:40 +0000 (10:18 -0500)
committerRuss Cox <rsc@golang.org>
Mon, 24 Feb 2014 15:18:40 +0000 (10:18 -0500)
LGTM=rsc
R=golang-codereviews, gobot, rsc
CC=golang-codereviews
https://golang.org/cl/64770043

src/pkg/time/tick.go

index b92c339c02a21ac7cab801b4361181ae6c73ba1d..3b42b66cfecb18fb5ded32db11dff80373d96b97 100644 (file)
@@ -17,6 +17,7 @@ type Ticker struct {
 // time with a period specified by the duration argument.
 // It adjusts the intervals or drops ticks to make up for slow receivers.
 // The duration d must be greater than zero; if not, NewTicker will panic.
+// Stop the ticker to release associated resources.
 func NewTicker(d Duration) *Ticker {
        if d <= 0 {
                panic(errors.New("non-positive interval for NewTicker"))