На главную

On-line справка по Win32 API

Написать письмо
БЕСПЛАТНАЯ ежедневная online лотерея! Выигрывай каждый день БЕСПЛАТНО!
Список всех статей A-B-C-D-E-F-G-H-I-J-K-L-M-N-O-P-Q-R-S-T-U-V-W-X-Y-Z | Скачать Вниз

GetProcessTimes



The GetProcessTimes function obtains timing information about a specified process.

BOOL GetProcessTimes(

HANDLE hProcess, // specifies the process of interest
LPFILETIME lpCreationTime, // when the process was created
LPFILETIME lpExitTime, // when the process exited
LPFILETIME lpKernelTime, // time the process has spent in kernel mode
LPFILETIME lpUserTime // time the process has spent in user mode
);


Parameters

hProcess

An open handle that specifies the process whose timing information is sought. This handle must be created with PROCESS_QUERY_INFORMATION access. For more information, see Process Objects.

lpCreationTime

Points to a FILETIME structure that receives the creation time of the process.

lpExitTime

Points to a FILETIME structure that receives the exit time of the process. If the process has not exited, the content of this structure is undefined.

lpKernelTime

Points to a FILETIME structure that receives the amount of time that the process has executed in kernel mode. The time that each of the threads of the process has executed in kernel mode is determined, and then all of those times are summed together to obtain this value.

lpUserTime

Points to a FILETIME structure that receives the amount of time that the process has executed in user mode. The time that each of the threads of the process has executed in user mode is determined, and then all of those times are summed together to obtain this value.



Return Values

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

All times are expressed using FILETIME data structures. Such a structure contains two 32-bit values that combine to form a 64-bit count of 100-nanosecond time units.
Process creation and exit times are points in time expressed as the amount of time that has elapsed since midnight on January 1, 1601 at Greenwich, England. The Win32 API provides several functions that an application can use to convert such values to more generally useful forms.
Process kernel mode and user mode times are amounts of time. For example, if a process has spent one second in kernel mode, this function will fill the FILETIME structure specified by lpKernelTime with a 64-bit value of ten million. That is the number of 100-nanosecond units in one second.

See Also

FILETIME, FileTimeToDosDateTime, FileTimeToLocalFileTime, FileTimeToSystemTime


Пригласи друзей и счет твоего мобильника всегда будет положительным!
Предыдущая статья
 
Сайт Народ.Ру Интернет
Следующая статья
Пригласи друзей и счет твоего мобильника всегда будет положительным!

GetProcessTimes



Функция GetProcessTimes получает синхронизацию информации об определенном процессе.

BOOL GetProcessTimes(

РУЧКА hProcess, // определяет процесс интереса LPFILETIME lpCreationTime, // когда процесс был создан LPFILETIME lpExitTime, // когда процесс выходил из LPFILETIME lpKernelTime, // время процесс истратился в режим зерна LPFILETIME lpUserTime // время, процесс истратился в режим пользователя
);


Параметры

hProcess

Открытая ручка, которая определяет процесс, чья синхронизация информации поискана. Эта ручка должна быть создана доступом PROCESS_QUERY_INFORMATION. Более подробно, видьте как Процесс Возражал.

lpCreationTime

Точки на структуру FILETIME, которые получают время создания процесса.

lpExitTime

Точки на структуру FILETIME, которые получают выходное время процесса. Если процесс не выходил бы из, содержимое этой структуры неопределенное.

lpKernelTime

Точки на структуру FILETIME, которые получают время, которое процесс выполнил в режиме зерна. Время, что каждая резьба процесса выполнилась в режиме зерна определен, и затем все то время суммируется вместе, чтобы получать эту величину.

lpUserTime

Точки на структуру FILETIME, которые получают время, которое процесс выполнил в режиме пользователя. Время, что каждая резьба процесса выполнилась в режиме пользователя определен, и затем все то время суммируется вместе, чтобы получать эту величину.



Обратные Величины

Если функция добивается успеха, обратная величина ненулевая.
Если функция терпит неудачу, обратная величина нулевая. Для того, чтобы расширять информацию ошибки, назовите GetLastError.

Замечания

Все время выражено используя структуры данных FILETIME. Такая структура содержит две 32- битовых величины, которые объединяются, чтобы формировать 64- битовый счет устройств времени 100- наносекунды.
Обработайте создание и выходное время является точками во-время выраженными как время, которое прошло с полуночи в Январе 1, 1601 в Greenwich, Англии. Win32 API Обеспечивает несколько функций, который приложение может использовать, чтобы преобразовывать такие величины, чтобы более обычно полезные формы.
Обработайте режим зерна и время режима пользователя является временем. Например, если процесс истратил бы один секунда в режиме зерна, эта функция заполнит структуру FILETIME определенную lpKernelTime с 64- битовой величиной десяти миллионов. Это - номер устройств 100- наносекунды через одной секунде.

Смотри Также

FILETIME, FileTimeToDosDateTime, FileTimeToLocalFileTime, FileTimeToSystemTime


Вверх Version 1.3, Oct 26 2010 © 2007, 2010, mrhx Вверх
 mrhx software  Русский перевод OpenGL  Русский перевод Win32 API
 
Используются технологии uCoz