MTIMER Struct Reference

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

#include <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 Report (MISTRING &string, const char *group, const char *key) const
void ReportShort (MISTRING &string, int places=0) const
void Start ()
void Set (double seconds)
void Stop ()


Detailed Description

Interval timer, used to time operations.

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

Definition at line 52 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,
const char *  group,
const char *  key
const
 

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

Deprecated:
Replaced by variant using TEXTID. 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 the group/key are NULL, it will just report the time

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 Aug 12 06:27:03 2004 for TNTsdk by doxygen 1.3.4-20031026