]> Cypherpunks repositories - gostls13.git/commit
time: add Ticker.Reset
authorChangkun Ou <hi@changkun.us>
Mon, 3 Feb 2020 13:42:32 +0000 (14:42 +0100)
committerIan Lance Taylor <iant@golang.org>
Mon, 24 Feb 2020 01:50:28 +0000 (01:50 +0000)
commit402ea9e4f9ddcd2ed595ac12ce1b4e39f82e128f
tree7013229276d72fc24079c310be3a20c6bde100e9
parent0f2a1574b02de3fec6937e65b1bdc21106bef15c
time: add Ticker.Reset

This CL implements Ticker.Reset method in time package.

Benchmark:
name                 time/op
TickerReset-12       6.41µs ±10%
TickerResetNaive-12  95.7µs ±12%

Fixes #33184

Change-Id: I4cbd31796efa012b2a297bb342158f11a4a31fef
Reviewed-on: https://go-review.googlesource.com/c/go/+/220424
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
api/next.txt
doc/go1.15.html
src/runtime/time.go
src/time/sleep.go
src/time/tick.go
src/time/tick_test.go