User Manual, Developers Guide and API Documentation

wns::StopWatch Class Reference

Measures wallclock time in seconds. More...

#include <StopWatch.hpp>

Inheritance diagram for wns::StopWatch:

Inheritance graph
[legend]
Collaboration diagram for wns::StopWatch:

Collaboration graph
[legend]

List of all members.

Public Member Functions

double getInSeconds () const
 Return the time in seconds.
void start ()
 Start measuring.
double stop ()
 Stop measuring.
 StopWatch ()
 Init to zero seconds.

Private Member Functions

std::string doToString () const
 Return the time in seconds as string.

Private Attributes

timeval begin_
 Start point of measurement.
timeval end_
 End point of measurement.
bool isRunning_


Detailed Description

Author:
Marc Schinnenburg <marc@schinnenburg.com>

Definition at line 40 of file StopWatch.hpp.


Constructor & Destructor Documentation

StopWatch::StopWatch (  ) 

Definition at line 33 of file StopWatch.cpp.


Member Function Documentation

std::string StopWatch::doToString (  )  const [private, virtual]

Implements wns::IOutputStreamable.

Definition at line 69 of file StopWatch.cpp.

double StopWatch::getInSeconds (  )  const

Note:
May only be called after stop() has been called.

Definition at line 61 of file StopWatch.cpp.

void StopWatch::start (  ) 

Definition at line 44 of file StopWatch.cpp.

double StopWatch::stop (  ) 

Definition at line 52 of file StopWatch.cpp.


Member Data Documentation

timeval wns::StopWatch::begin_ [private]

Definition at line 79 of file StopWatch.hpp.

timeval wns::StopWatch::end_ [private]

Definition at line 84 of file StopWatch.hpp.

Definition at line 86 of file StopWatch.hpp.


The documentation for this class was generated from the following files:

Generated on Sat May 26 03:32:51 2012 for openWNS by  doxygen 1.5.5