MTIMER Struct Reference

Interval timer, used to time operations. More...

#include <mi32/mtimer.h>

List of all members.

Public Member Functions

 MTIMER ()
 ~MTIMER ()
void Clear ()
void GetString (MISTRING &string) const
double GetValue () const
bool IsOn () const
void Report (MISTRING &string, TEXTID textid=TEXTID__None) const
void ReportElapsed (MISTRING &string) const
void ReportElapsedAbbr (MISTRING &string) const
void ReportShort (MISTRING &string, int places=0) const
void Set (double seconds)
void Start ()
void Stop ()

Detailed Description

Interval timer, used to time operations.

Timer is accurate to 100ns on Windows and 1ms on other platforms.


Constructor & Destructor Documentation

MTIMER::MTIMER (  ) 

Default constructor.

MTIMER::~MTIMER (  ) 

Destructor.


Member Function Documentation

void MTIMER::Clear (  ) 

Clear timer.

Also stops timer.

void MTIMER::GetString ( MISTRING string  )  const
double MTIMER::GetValue (  )  const

Get the value of the timer in seconds.

bool MTIMER::IsOn (  )  const

Determine if timer is currently 'on'.

void MTIMER::Report ( MISTRING string,
TEXTID  textid = TEXTID__None 
) const

Report "Time to ???: xxx xxx xxx".

The ??? part is retrieved from the text resource file using the TEXTID provided. The rest of the message is built from text resource strings and the actual time.

If TEXTID__None is specified then only the time is reported.

void MTIMER::ReportElapsed ( MISTRING string  )  const

Report elapsed time in simple format.

0-90 seconds reported as seconds. 1.5 to 90 minutes reported as minutes. > 90 minutes reported as hours.

void MTIMER::ReportElapsedAbbr ( MISTRING string  )  const

Report elapsed time in simple format with abbreviated unit.

0-90 seconds reported as seconds. 1.5 to 90 minutes reported as minutes. > 90 minutes reported as hours.

void MTIMER::ReportShort ( MISTRING string,
int  places = 0 
) const

Report in "00:00" format.

Parameters:
places number of decimal places in seconds (eg, 0:00.00)
void MTIMER::Set ( double  seconds  ) 

Set the value of the timer.

void MTIMER::Start (  ) 

Start timer.

void MTIMER::Stop (  ) 

Stop timer.

Does not clear the timer.


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

Generated on Sun Oct 7 21:33:40 2012 for TNTsdk 2012 by  doxygen 1.6.1