Imagine++
Public Member Functions | List of all members
Imagine::Timer Class Reference

Timers. More...

#include "Imagine/Common.h"

Public Member Functions

 Timer ()
 Constructor. More...
 
double lap () const
 Lap. More...
 
void reset ()
 Reset. More...
 

Detailed Description

Small timer class

Examples:
Common/test/test.cpp.

Constructor & Destructor Documentation

◆ Timer()

Imagine::Timer::Timer ( )
inline

Constructs and start a timer

Timer t; // construct

Member Function Documentation

◆ lap()

double Imagine::Timer::lap ( ) const
inline

Seconds since construction of latest reset()

Returns
seconds
Timer t; // construct
// some code 1
double x=t.lap(); // seconds for code 1
// some code 2
x=t.lap(); // seconds for code 1+2
t.reset(); // reset
// some code 3
x=t.lap(); // seconds for code 3

Examples:
Common/test/test.cpp.

◆ reset()

void Imagine::Timer::reset ( )
inline

Reset timer

t.reset(); // reset

Examples:
Common/test/test.cpp.

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