Summary
Base class for a timer with particularly self-explanatory method names which are chainable. See Remarks.
Generic type parameters
T |
The type of the values that the timer returns. This may be a reference type if need be, as long as the descendant
fully supports a zero being equal to default(T) . |
Remarks
Idiomatic use example:
var tmr = new TmrSeconds().StartAndZero();
Constructors
| Instantiates the timer. The timer will be zeroed, and it will not be running. |
Instance methods
Tmr<T> | |
Makes sure the timer is running without zeroing the time reading. If the reading is non-zero, it will continue
growing. This method may be called while the timer is already running. |
Tmr<T> | |
Pauses the timer without zeroing it. This method may be called while the timer is already paused, but a single
call to Tmr<T>.Continue() is always sufficient to resume the timer. |
Tmr<T> | | Resets the timer and makes sure it's running. The current state of the timer is irrelevant. |
Tmr<T> | | Makes sure the timer is not running and zeroes it. The current state of the timer is irrelevant. |
Tmr<T> | | Resets the timer back to zero. |
Instance properties
T | |
Gets the current reading of the timer. This value increases between consecutive reads while the timer is running,
and remains fixed while it's paused. |
T | |
Gets the reading the timer had just before the last call to any of the methods of this class related to zeroing,
pausing and resuming the timer. |