Export (0) Print
Expand All
Expand Minimize

QueryProcessCycleTime function

Retrieves the sum of the cycle time of all threads of the specified process.

Syntax


BOOL WINAPI QueryProcessCycleTime(
  _In_   HANDLE ProcessHandle,
  _Out_  PULONG64 CycleTime
);

Parameters

ProcessHandle [in]

A handle to the process. The handle must have the PROCESS_QUERY_INFORMATION or PROCESS_QUERY_LIMITED_INFORMATION access right. For more information, see Process Security and Access Rights.

CycleTime [out]

The number of CPU clock cycles used by the threads of the process. This value includes cycles spent in both user mode and kernel mode.

Return value

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

Remarks

To enumerate the processes in the system, use the EnumProcesses function.

To compile an application that uses this function, define _WIN32_WINNT as 0x0600 or later.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

WinBase.h on Windows Vista, Windows 7, Windows Server 2008, and Windows Server 2008 R2 (include Windows.h);
Realtimeapiset.h on Windows 8 and Windows Server 2012

Library

Kernel32.lib

DLL

Kernel32.dll

See also

QueryIdleProcessorCycleTime
QueryThreadCycleTime

 

 

Community Additions

ADD
Show:
© 2014 Microsoft