NdisSetTimer (Windows Embedded CE 6.0)

1/6/2010

This function sets a timer object to fire after a specified interval, thereby running an associated timer function after the timer fires.

Syntax

VOID NdisSetTimer(
  PNDIS_TIMER Timer,
  UINT MillisecondsToDelay
);

Parameters

  • Timer
    [in] Points to caller-supplied resident storage for a timer object previously initialized with NdisInitializeTimer.
  • MillisecondsToDelay
    [in] Specifies the interval, in milliseconds, to elapse before NdisSetTimer calls the associated timer function.

Return Value

None.

Remarks

NdisSetTimer causes the driver-supplied timer function to run once after the given MillisecondsToDelay expires. This timer function becomes associated with the timer object after the protocol driver calls NdisInitializeTimer. Execution of this timer function is episodic, rather than periodic. A protocol must call NdisSetTimer each time the associated timer function should be run.

If a protocol calls NdisSetTimer or the NdisCancelTimer function with the same Timer pointer that was originally passed to another NdisSetTimer call before the originally specified MillisecondsToDelay has expired, the current call cancels the protocol's preceding call to NdisSetTimer. Any call to NdisSetTimer resets the given timer to expire at the interval specified in the most recent call and causes the associated timer function to run when the most recently specified interval has expired.

Timer resolution on the host varies. Consequently, calling NdisSetTimer with small time-interval values does not necessarily cause the execution of the timer function to occur exactly when the specified interval expires.

Requirements

Header ndis.h
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

NDIS Library Functions
NdisCancelTimer
NdisInitializeTimer