Compartilhar via


NdisSetTimer (Windows CE 5.0)

Send Feedback

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

VOID NdisSetTimer(PNDIS_TIMERTimer,UINTMillisecondsToDelay);

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 Values

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

OS Versions: Windows CE .NET 4.0 and later.
Header: Ndis.h.

See Also

NdisCancelTimer | NdisInitializeTimer

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.