OpenANN  1.1.0
An open source library for artificial neural networks.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
List of all members | Public Types | Public Member Functions
Stopwatch Class Reference

#include <Stopwatch.h>

Public Types

enum  Precision {
  MICROSECOND, MILLISECOND, HUNDREDTHS, TENTHS,
  SECONDS
}
 

Public Member Functions

 Stopwatch ()
 Starts the stopwatch. More...
 
void start ()
 Starts or restarts the stopwatch. More...
 
unsigned long stop ()
 This does not really stop the stopwatch. More...
 
unsigned long stop (Precision p)
 This does not really stop the stopwatch. More...
 
unsigned long getDuration ()
 

Member Enumeration Documentation

Enumerator
MICROSECOND 
MILLISECOND 
HUNDREDTHS 
TENTHS 
SECONDS 

Constructor & Destructor Documentation

Stopwatch::Stopwatch ( )
inline

Starts the stopwatch.

Member Function Documentation

unsigned long Stopwatch::getDuration ( )
inline
Returns
The last calculated duration. Requires that stop() has been called before. Otherwise it returns 0.
void Stopwatch::start ( )
inline

Starts or restarts the stopwatch.

unsigned long Stopwatch::stop ( )
inline

This does not really stop the stopwatch.

It just calculates the duration since start.

Returns
The passed time since start.
unsigned long Stopwatch::stop ( Precision  p)
inline

This does not really stop the stopwatch.

It just calculates the duration since start.

Returns
The passed time since start.

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