Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenperfcnt.c
Go to the documentation of this file.
00001 /* 00002 * COPYRIGHT: See COPYING in the top level directory 00003 * PROJECT: ReactOS Win32 Base API 00004 * FILE: dll/win32/kernel32/client/perfcnt.c 00005 * PURPOSE: Performance Counter 00006 * PROGRAMMER: Eric Kohl 00007 */ 00008 00009 /* INCLUDES *******************************************************************/ 00010 00011 #include <k32.h> 00012 00013 #define NDEBUG 00014 #include <debug.h> 00015 00016 /* FUNCTIONS ******************************************************************/ 00017 00018 /* 00019 * @implemented 00020 */ 00021 BOOL 00022 WINAPI 00023 QueryPerformanceCounter(OUT PLARGE_INTEGER lpPerformanceCount) 00024 { 00025 LARGE_INTEGER Frequency; 00026 NTSTATUS Status; 00027 00028 Status = NtQueryPerformanceCounter(lpPerformanceCount, &Frequency); 00029 if (!Frequency.QuadPart) Status = STATUS_NOT_IMPLEMENTED; 00030 00031 if (!NT_SUCCESS(Status)) 00032 { 00033 BaseSetLastNTError(Status); 00034 return FALSE; 00035 } 00036 00037 return TRUE; 00038 } 00039 00040 /* 00041 * @implemented 00042 */ 00043 BOOL 00044 WINAPI 00045 QueryPerformanceFrequency(OUT PLARGE_INTEGER lpFrequency) 00046 { 00047 LARGE_INTEGER Count; 00048 NTSTATUS Status; 00049 00050 Status = NtQueryPerformanceCounter(&Count, lpFrequency); 00051 if (!Count.QuadPart) Status = STATUS_NOT_IMPLEMENTED; 00052 00053 if (!NT_SUCCESS(Status)) 00054 { 00055 BaseSetLastNTError(Status); 00056 return FALSE; 00057 } 00058 00059 return TRUE; 00060 } 00061 00062 /* EOF */ Generated on Wed May 23 2012 04:22:09 for ReactOS by
1.7.6.1
|