VR-Link API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Attributes | Static Protected Attributes
DtTimeStatistic Class Reference

This object takes time samples and maintains the minimum and maximum as well as a running average of the time samples. More...

+ Collaboration diagram for DtTimeStatistic:

Public Member Functions

 DtTimeStatistic ()
 CTOR.
void addTime (double time)
 Add a new time sample.
double last () const
 Get the last added time sample;.
double minimum () const
 Get the minimum time sample.
double avg () const
 Get the average time sample, averages between the last (theMaxCount -> 2*theMaxCount).
double maximum () const
 Get the maximum time sample.
void reset ()
 Reset the stat back to it's original settings.

Protected Attributes

double myLastTime
double myMinimum
double mySum
double myLastSum
double myMaximum
unsigned int myCount
unsigned int myLastCount

Static Protected Attributes

static const int theMaxCount = 1000

Detailed Description

This object takes time samples and maintains the minimum and maximum as well as a running average of the time samples.

Typically time samples are in 'seconds' but this is not a hard requirements as long as the samples are doubles and early time < later time. Users usually do not create DtTimeStatistic objects but rather automatically created instances by the DtPerformanceStats class.

Examples

Constructor & Destructor Documentation

DtTimeStatistic::DtTimeStatistic ( )

CTOR.

Member Function Documentation

void DtTimeStatistic::addTime ( double  time)

Add a new time sample.

double DtTimeStatistic::avg ( ) const
inline

Get the average time sample, averages between the last (theMaxCount -> 2*theMaxCount).

double DtTimeStatistic::last ( ) const
inline

Get the last added time sample;.

double DtTimeStatistic::maximum ( ) const
inline

Get the maximum time sample.

double DtTimeStatistic::minimum ( ) const
inline

Get the minimum time sample.

void DtTimeStatistic::reset ( )

Reset the stat back to it's original settings.

Member Data Documentation

unsigned int DtTimeStatistic::myCount
protected
unsigned int DtTimeStatistic::myLastCount
protected
double DtTimeStatistic::myLastSum
protected
double DtTimeStatistic::myLastTime
protected
double DtTimeStatistic::myMaximum
protected
double DtTimeStatistic::myMinimum
protected
double DtTimeStatistic::mySum
protected
const int DtTimeStatistic::theMaxCount = 1000
staticprotected

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

Document ID: Generated on Mon Apr 8 04:49:21 EDT 2019 from SVN revision 197403
Copyright © 2005-2016 VT MÄK. All Rights Reserved (www.mak.com)