wiki:Docs/Prog/Manual/ApplicationLibraries/lib825ev/Time/CMillisecondTimer

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

Last modified 14 years ago Last modified on 11/23/10 10:36:45
Note: See TracWiki for help on using the wiki.