MyraMath
Classes
Stopwatch.h File Reference

A multishot timing class, delegates to Timer. More...

#include <myramath/MYRAMATH_EXPORT.h>
#include <myramath/utility/Timer.h>
Include dependency graph for Stopwatch.h:

Go to the source code of this file.

Classes

class  myra::Stopwatch
 A multishot timing class, delegates to Timer. More...
 

Detailed Description

A multishot timing class, delegates to Timer.

Example usage: Stopwatch stopwatch; for (int i = 0; i < 100; ++i) { function1(); function2(); stopwatch.start(); function3(); stopwatch.stop(); function4(); } Measures the time for 100 iterations of function3, without function1/2/4. std::cout << stopwatch.read() << std::endl;