Poco

class Stopwatch

File Information

Library: Foundation
Package: DateTime
Header: Poco/Stopwatch.h

Description

A simple facility to measure time intervals with microsecond resolution.

Member Summary

Member Functions: elapsed, elapsedSeconds, reset, resolution, restart, start, stop

Constructors

Stopwatch

Stopwatch();

Destructor

~Stopwatch

~Stopwatch();

Member Functions

elapsed

Clock::ClockDiff elapsed() const;

Returns the elapsed time in microseconds since the stopwatch started.

elapsedSeconds inline

int elapsedSeconds() const;

Returns the number of seconds elapsed since the stopwatch started.

reset

void reset();

Resets the stopwatch.

resolution static inline

static Clock::ClockVal resolution();

Returns the resolution of the stopwatch.

restart

void restart();

Resets and starts the stopwatch.

start inline

void start();

Starts (or restarts) the stopwatch.

stop inline

void stop();

Stops or pauses the stopwatch.