title
Graph Drawing Toolkit

An object-oriented C++ library for handling and drawing graphs

stopwatch Class Reference

#include <stopwatch.h>

Collaboration diagram for stopwatch:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 stopwatch (time_type=USER_TIME)
void start ()
void reset ()
double get ()
double pause ()


Detailed Description

Definition at line 44 of file stopwatch.h.


Constructor & Destructor Documentation

stopwatch::stopwatch ( time_type  = USER_TIME  ) 

Create a new stopwatch and starts it. If no time_type is given the stopwatch will count the user time, otherwise if SYSTEM_TIME is specified, the stopwatch will count absolute time. When created the stopwatch is up and runnig.


Member Function Documentation

void stopwatch::start (  ) 

Start the stopwatch. If the stopwatch is already running, then calling this function has no effect. If the stopwatch is in pause, then calling this function will make it count time again.

void stopwatch::reset (  ) 

Reset the stopwatch. Leaves the stopwatch in pause with zero as a total time.

double stopwatch::get (  ) 

Return the time elapsed till now. The value returned is in seconds. The stopwatch will continue counting

double stopwatch::pause (  ) 

Put the stopwatch in pause: the time is no more counted. A second calling of this function will be ignored. The value of the time (in seconds) elapsed till now is returned. To restart the stopwatch use start().


The documentation for this class was generated from the following file:
Generated on Thu Jan 10 14:49:03 2008 for GDToolkit GAPI by  doxygen 1.5.3