MTIMER Struct Reference

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

#include <mi32/mtimer.h>

List of all members.

Public Member Functions

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


Detailed Description

Interval timer, used to time operations.

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

Definition at line 64 of file mtimer.h.


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::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 Thu Apr 26 04:47:21 2007 for TNTsdk by  doxygen 1.5.2