PIPS
CPerfCounter Class Reference

Counter that provides a fairly accurate timing mechanism for both windows and linux. More...

#include <Timer.h>

Public Member Functions

 CPerfCounter ()
 Constructor for CPerfCounter that initializes the class. More...
 
 ~CPerfCounter ()
 Destructor for CPerfCounter that cleans up the class. More...
 
void Start (void)
 Start the timer. More...
 
void Stop (void)
 Stop the timer. More...
 
void Reset (void)
 Reset the timer to 0. More...
 
double GetElapsedTime (void)
 

Private Attributes

i64 _freq
 
i64 _clocks
 
i64 _start
 

Detailed Description

Counter that provides a fairly accurate timing mechanism for both windows and linux.

This timer is used extensively in all the samples.

Definition at line 119 of file Timer.h.

Constructor & Destructor Documentation

◆ CPerfCounter()

CPerfCounter::CPerfCounter ( )

Constructor for CPerfCounter that initializes the class.

◆ ~CPerfCounter()

CPerfCounter::~CPerfCounter ( )

Destructor for CPerfCounter that cleans up the class.

Member Function Documentation

◆ GetElapsedTime()

double CPerfCounter::GetElapsedTime ( void  )
Returns
Amount of time that has accumulated between the Start() and Stop() function calls

◆ Reset()

void CPerfCounter::Reset ( void  )

Reset the timer to 0.

See also
Start(), Stop()

◆ Start()

void CPerfCounter::Start ( void  )

Start the timer.

See also
Stop(), Reset()

◆ Stop()

void CPerfCounter::Stop ( void  )

Stop the timer.

See also
Start(), Reset()

Field Documentation

◆ _clocks

i64 CPerfCounter::_clocks
private

Definition at line 160 of file Timer.h.

◆ _freq

i64 CPerfCounter::_freq
private

Definition at line 159 of file Timer.h.

◆ _start

i64 CPerfCounter::_start
private

Definition at line 161 of file Timer.h.


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