Visit Cem Yuksel's web site

Files

Class List

Class Members

Class Hierarchy

cyTimerStats Class Reference

#include <cyTimer.h>

List of all members.


Detailed Description

Stopwatch class with statistics.

Use this class to measure the time between Start and Stop calls. Unlike cyTimer class, this class also provides statistical information.


Access time records

unsigned char GetRecordCount () const
 Returns the number of time records.
const double * GetRecords () const
 Returns the array of time records.
cyTimer timer
 Returns the number of time records.
double times [128]
 Returns the number of time records.
double minTime
 Returns the number of time records.
double maxTime
 Returns the number of time records.
double totalTime
 Returns the number of time records.
unsigned char pos
 Returns the number of time records.

Public Member Functions

Timer Methods
void Start ()
 Starts the timer.
double Stop ()
 Stops the timer and records the current measurement.
Statistics Methods
void Clear ()
 Clears all the time records.
double GetLastTime () const
 Returns the last measured time.
double GetMin () const
 Returns the minimum measured time.
double GetMax () const
 Returns the maximum measured time.
double GetAverage () const
 Returns the average of all recorded times (max previous 128 records).
double GetVariance () const
 Returns the variance of the time records.
double GetStdev () const
 Returns the standard deviation of the time records.


Member Function Documentation

double GetLastTime  )  const [inline]
 

Returns the last measured time.

If no time is measured before, returns zero.

double GetStdev  )  const [inline]
 

Returns the standard deviation of the time records.

Note that this method goes over all time records, so it may take a little time to compute the standard deviation.

double GetVariance  )  const [inline]
 

Returns the variance of the time records.

Note that this method goes over all time records, so it may take a little time to compute the variance.

double Stop  )  [inline]
 

Stops the timer and records the current measurement.

Returns the time passed since Start call in seconds.

Visit Cem Yuksel's website!