Loading...
Searching...
No Matches
OBStopwatch Class Reference

`#include <openbabel/obutil.h>`

## Public Member Functions

void | Start ()
double | Lap ()
double | Elapsed ()

## Detailed Description

Stopwatch class used for timing length of execution.

The OBStopwatch class makes timing the execution of blocks of code to microsecond accuracy very simple. The class effectively has two functions, Start() and Elapsed(). The usage of the OBStopwatch class is demonstrated by the following code:

OBStopwatch sw;
sw.Start();
//insert code here
cout << "Elapsed time = " << sw.Elapsed() << endl;
OpenBabel::OBStopwatch
Stopwatch class used for timing length of execution.
Definition obutil.h:51
OpenBabel::OBStopwatch::Start
void Start()
Mark the start of "stopwatch" timing.
Definition obutil.h:76
OpenBabel::OBStopwatch::Elapsed
double Elapsed()
Definition obutil.h:90

## Member Function Documentation

## Start()

void Start | ( |  | ) |

inline

Mark the start of "stopwatch" timing.

## Lap()

double Lap | ( |  | ) |

inline

Returns
  The time since calling OBStopwatch::Start() in seconds.

Referenced by Elapsed().

## Elapsed()

double Elapsed | ( |  | ) |

inline

Returns
  The time since calling OBStopwatch::Start() in seconds.

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

- obutil.h