timer struct
More...
#include <NPLCommon.h>
|
| NPLTimer (const string &nplFile, const string &sCode, float fInterval) |
|
| NPLTimer (const string &nplFile, const string &sCode, DWORD dwInterval) |
|
void | Change (int dueTime, int period) |
| Changes the start time and the interval between method invocations for a timer, using 32-bit signed integers to measure time intervals. More...
|
|
bool | Tick (NPLRuntimeState_ptr runtime_state, DWORD nTickCount=0) |
| set the tick count. More...
|
|
|
const string | m_nplFile |
|
const string | m_sCode |
|
§ NPLTimer() [1/2]
NPLTimer::NPLTimer |
( |
const string & |
nplFile, |
|
|
const string & |
sCode, |
|
|
float |
fInterval |
|
) |
| |
- Parameters
-
fInterval | interval in seconds |
§ NPLTimer() [2/2]
NPLTimer::NPLTimer |
( |
const string & |
nplFile, |
|
|
const string & |
sCode, |
|
|
DWORD |
dwInterval |
|
) |
| |
- Parameters
-
nInterval | interval in milliseconds |
§ Change()
void NPL::NPLTimer::Change |
( |
int |
dueTime, |
|
|
int |
period |
|
) |
| |
Changes the start time and the interval between method invocations for a timer, using 32-bit signed integers to measure time intervals.
[thread safe]
- Parameters
-
nIDEvent | Specifies the timer to be destroyed.For nIDEvent<=0, they are reserved for internal uses can not be killed by this function. This value must be the same as the nIDEvent value passed to the SetTimer function that created the timer. |
dueTime | The amount of time to delay before the invoking the callback method specified when the Timer was constructed, in milliseconds. Specify zero (0) to restart the timer immediately. |
period:The | time interval between invocations of the callback method specified when the Timer was constructed, in milliseconds. |
§ Tick()
bool NPL::NPLTimer::Tick |
( |
NPLRuntimeState_ptr |
runtime_state, |
|
|
DWORD |
nTickCount = 0 |
|
) |
| |
set the tick count.
it will return true, if the timer is activated. call this function regularly with new tick count. [thread safe]
- Parameters
-
runtime_state | the NPL runtime state in which this is called. |
nTickCount | it should be ::GetTickCount() in millisecond. if 0, we will call the system ::GetTickCount() to get the current tick count. |
- Returns
- true if timer is activated.
The documentation for this struct was generated from the following files:
- Client/trunk/ParaEngineClient/NPL/NPLCommon.h
- Client/trunk/ParaEngineClient/NPL/NPLCommon.cpp