diff options
| author | Shenghou Ma <minux@golang.org> | 2016-02-28 19:32:29 -0500 |
|---|---|---|
| committer | Minux Ma <minux@golang.org> | 2016-02-29 02:33:26 +0000 |
| commit | 28ce6f3600fd87a1ae39c492ee56307f0be3c32f (patch) | |
| tree | 0efd7433547e0f95a8e7c1bf0b49327dcee5846e /src | |
| parent | 1b417e20ffe052d51835ec84dcc5df08717cb8a3 (diff) | |
| download | go-28ce6f3600fd87a1ae39c492ee56307f0be3c32f.tar.xz | |
time: document Tick will return nil if d <= 0
Fixes #14557.
Change-Id: I9610b79aafe9c15f9c998739b586fd0b41b90d70
Reviewed-on: https://go-review.googlesource.com/20031
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src')
| -rw-r--r-- | src/time/tick.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/time/tick.go b/src/time/tick.go index 196e8ac61a..ccc2d9b479 100644 --- a/src/time/tick.go +++ b/src/time/tick.go @@ -50,6 +50,7 @@ func (t *Ticker) Stop() { // channel only. While Tick is useful for clients that have no need to shut down // the Ticker, be aware that without a way to shut it down the underlying // Ticker cannot be recovered by the garbage collector; it "leaks". +// Unlike NewTicker, Tick will return nil if d <= 0. func Tick(d Duration) <-chan Time { if d <= 0 { return nil |
