|
Sparkle 0.0.1
|
Monotonic stopwatch tracking elapsed duration with start/pause/resume controls. More...
#include <spk_chronometer.hpp>

Public Types | |
| enum class | State { Idle , Running , Paused } |
| States representing the current stopwatch lifecycle. | |
Public Member Functions | |
| Chronometer () | |
| Builds a chronometer in the idle state with zeroed counters. | |
| void | start () |
| Starts measuring time if idle or resets accumulation after stop. | |
| void | stop () |
| Stops the chronometer and resets accumulated duration. | |
| void | pause () |
| Pauses ongoing measurement without clearing accumulated time. | |
| void | resume () |
| Resumes measurement after a pause. | |
| void | restart () |
| Convenience to stop and immediately start a new measurement. | |
| Duration | elapsedTime () const |
| Returns the total measured duration including paused segments. | |
| State | state () const |
| Retrieves the current state of the chronometer. | |
Monotonic stopwatch tracking elapsed duration with start/pause/resume controls.
| Duration spk::Chronometer::elapsedTime | ( | ) | const |
Returns the total measured duration including paused segments.
|
inline |
Retrieves the current state of the chronometer.