Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

time: Add (*Ticker) Start() #7883

gopherbot opened this issue Apr 28, 2014 · 1 comment


None yet
2 participants
Copy link

commented Apr 28, 2014

by opennota:

Some use cases for tickers require stopping the ticker and restarting it later.  This
behaviour can be emulated using time.After, but it requires creating new timers each
time you want to restart it.  I suggest to add the following methods:

  // NewUnstartedTicker returns a new ticker, but does not start it.
  func NewUnstartedTicker(d Duration) *Ticker

  // Start starts stopped or unstarted ticker.
  func (*Ticker) Start()

This comment has been minimized.

Copy link

commented Apr 28, 2014

Comment 1:

A simple API is preferable.  We should not complicate it for an unusual use case, if
that use case can be implemented in some other way.  In particular, consider using a
Timer, which supports a Reset method.

Status changed to WontFix.

@gopherbot gopherbot added the wontfix label Apr 28, 2014

@golang golang locked and limited conversation to collaborators Jun 25, 2016

This issue was closed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.