Kernel32QueryIdleProcessorCycleTime Method
Retrieves the cycle time for the idle thread of each processor in the system.
On a system with more than 64 processors, this function retrieves the cycle time for the idle thread of
each processor in the processor group to which the calling thread is assigned.
Use the
QueryIdleProcessorCycleTimeEx(UInt16, UInt32, IntPtr) function to retrieve the cycle time for the idle thread on
each logical processor for a specific processor group.
Namespace: DevCase.Win32.NativeMethodsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("Kernel32.dll", ExactSpelling = true, SetLastError = true)]
public static bool QueryIdleProcessorCycleTime(
ref uint refBufferLength,
IntPtr processorIdleCycleTime
)
<DllImportAttribute("Kernel32.dll", ExactSpelling := true, SetLastError := true>]
Public Shared Function QueryIdleProcessorCycleTime (
ByRef refBufferLength As UInteger,
processorIdleCycleTime As IntPtr
) As Boolean
Dim refBufferLength As UInteger
Dim processorIdleCycleTime As IntPtr
Dim returnValue As Boolean
returnValue = Kernel32.QueryIdleProcessorCycleTime(refBufferLength,
processorIdleCycleTime)
public:
[DllImportAttribute(L"Kernel32.dll", ExactSpelling = true, SetLastError = true)]
static bool QueryIdleProcessorCycleTime(
unsigned int% refBufferLength,
IntPtr processorIdleCycleTime
)
[<DllImportAttribute("Kernel32.dll", ExactSpelling = true, SetLastError = true)>]
static member QueryIdleProcessorCycleTime :
refBufferLength : uint32 byref *
processorIdleCycleTime : IntPtr -> bool
No code example is currently available or this language may not be supported.
- refBufferLength UInt32
-
On input, specifies the size of the processorIdleCycleTime buffer, in bytes.
This buffer is expected to be 8 times the number of processors in the group.
On output, specifies the number of elements written to the buffer.
If the buffer size is not sufficient, the function fails and this parameter receives the required length of the buffer.
- processorIdleCycleTime IntPtr
-
The number of CPU clock cycles used by each idle thread. This buffer must be 8 times the number of processors in the system in size.
Boolean
If the function succeeds, the return value is
.
If the function fails, the return value is
.
To get extended error information, call
GetLastWin32Error.