Library: Foundation
Package: DateTime
Header: Poco/Stopwatch.h
A simple facility to measure time intervals with microsecond resolution.
Note that Stopwatch is based on the Timestamp class. Therefore, if during a Stopwatch run, the system time is changed, the measured time will not be correct.
Member Functions: elapsed, elapsedSeconds, reset, resolution, restart, start, stop
Stopwatch();
~Stopwatch();
Timestamp::TimeDiff elapsed() const;
Returns the elapsed time in microseconds since the stopwatch started.
int elapsedSeconds() const;
Returns the number of seconds elapsed since the stopwatch started.
void reset();
Resets the stopwatch.
static Timestamp::TimeVal resolution();
Returns the resolution of the stopwatch.
void restart();
Resets and starts the stopwatch.
void start();
Starts (or restarts) the stopwatch.
void stop();
Stops or pauses the stopwatch.