Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make NewTicker panic if d<=0, like time.NewTicker.
This more closely follows the standard library function behavior. It is directly copied from the standard library: https://cs.opensource.google/go/go/+/refs/tags/go1.20.3:src/time/tick.go;l=23-25 Although panicking is generally bad, it is preferable to mimic the standard library so users see the same behavior between clockwork and the golang standard library. Without this, some tests can pass with a no op where a real time.Ticker implementation would crash.
- Loading branch information