Version 1 (modified by 14 years ago) ( diff ) | ,
---|
Table of Contents
CMillisecondTimer
CMillisecondTimer is a C++ class for timer functions.
Constructors
CMillisecondTimer(void); CMillisecondTimer(int nMilliseconds, bool bAutoRepeat = false);
Parameters
- nMilliseconds - Time interval value in milliseconds
- bAutoRepeat - True for a repeating timer.
Example
CMillisecondTimer tmr(3000, true); tmr.Start(); // Start 3 second count while(1) { // ... We can do some processing here if(tmr.IsExpired()) { // Do something every three seconds } }
Member Functions
Set
void Set(int nMilliseconds, bool bAutoRepeat = false);
Parameters
- nMilliseconds - Timer interval in milliseconds
- bAutoRepeat - True for repeating timer.
Return Value
Function does not return a value.
Remarks
Example
Clear
void Clear(void);
Parameters
Function does not accept any parameters.
Return Value
Function does not return a value.
Remarks
Example
Note:
See TracWiki
for help on using the wiki.