PowerState.WaitForIdleCPU Method

Waits for the system to enter an idle state (no active threads).

Namespace: Microsoft.SPOT.Hardware
Assembly: Microsoft.SPOT.Hardware (in microsoft.spot.hardware.dll)

Syntax

[MethodImplAttribute(InternalCall)]
public static bool WaitForIdleCPU (
         intexpectedWorkItemDuration,
         inttimeout
)

Parameters

  • expectedWorkItemDuration
    The amount of idle time required to run the task.
  • timeout
    The timeout in milliseconds for the system to wait for the appropriate idle time.

Return Value

true if the current idle time is greater than or equal to the time indicated by exeConstraintTimeout_ms; otherwise, false.

Remarks

This method waits for the system to enter an idle state (no active threads). The call will return either when the timeout has expired, or when the current idle time is greater than or equal to the expectedWorkItemDuration parameter (in milliseconds).

Version Information

Available in the .NET Micro Framework versions 4.0 and 4.1.

See Also

Reference

PowerState Class
PowerState Members
Microsoft.SPOT.Hardware Namespace