Microsoft Windows CE 3.0  


This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

This function sets a timer to fire periodically, thus running an associated MiniportTimerfunction repeatedly at fixed intervals.

VOID NdisMSetPeriodicTimer(


Pointer to caller-supplied resident storage for a timer object previously initialized with the NdisMInitializeTimerfunction.
Specifies the interval, in milliseconds, to time out before calling the MiniportTimerfunction unless the timer is canceled or this interval is reset.


This function causes the driver-supplied MiniportTimerfunction, which was associated with the timer object when MiniportInitializecalled NdisMInitializeTimer, to be run repeatedly whenever the specified MillisecondsPeriodexpires. At the initial call to this function, the timer object is queued until the MillisecondsPeriodexpires; then the MiniportTimerfunction is run, and the timer object is automatically requeued for the next interval.

By contrast, NdisMSetTimercauses the driver-supplied function associated with a particular timer object to run only once after the given MillisecondsToDelayexpires. That is, execution of this function associated with the Timerpassed to NdisMSetTimeris episodic, rather than periodic.

As a general rule, a miniport should allocate and initialize two timer objects if it calls both this function and NdisMSetTimer. Such a driver is likely to have two MiniportTimerfunctions with different functionality, each associated with a particular timer object when it is initialized with NdisMInitializeTimer. For example, a MiniportTimerfunction that runs periodically might poll device state at regular intervals, whereas another MiniportTimerfunction might retry a particular run-time operation only if it times out on the NIC.

If a miniport calls this function, NdisMCancelTimer, or NdisMSetTimerwith the same Timerpointer originally passed to this function, the current call cancels its preceding call to this function, possibly resetting the MillisecondsPeriodspecified originally. Any call to an NDIS timer function resets the specified timer to expire at the interval specified in the most recent call and causes the associated MiniportTimerfunction to run when the most recently specified interval has expired.

Timer resolution on the host varies. Consequently, calling this function with very small periods does not necessarily cause the execution of the MiniportTimerfunction exactly when the specified interval expires.

A driver that calls this function runs at IRQL <= DISPATCH_LEVEL.


Runs on Versions Defined in Include Link to
Windows CE OS 2.0 and later Ndis.h    
Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

NdisMCancelTimer, NdisMInitializeTimer, NdisMSetTimer

 Last updated on Tuesday, July 13, 2004

© 2004 Microsoft Corporation. All rights reserved.