16395, “bradcray”, “Should we change/rename the methods used to clear/reset/restart the stopwatch type?”, “2020-09-15T20:45:32Z”
The current Timer
type has a clear()
method that sets the elapsed time to zero and does not affect whether the stopwatch is running or not (like a physical stopwatch, if it’s stopped, it remains stopped; if it’s running, it continues running). This issue asks whether that interface or behavior should change in some way or whether new routines/arguments should be added.
- should the current behavior or name of
clear()
change? - should we add a way to both zero the elapsed time and stop the timer? (essentially, setting it back to its initial state)
- we could do this via a new method (e.g.,
reset()
) - we could do this via a(n optional) argument to
clear()
(e.g.,proc clear(stop: bool [= false]) { ... }
- or both
- we could do this via a new method (e.g.,