reactos/dll/win32/kernel32/client/perfcnt.c
Cameron Gutman c2d0d784c7 [USB-BRINGUP-TRUNK]
- Create a branch to do a proper merge of USB work from a trunk base instead of from cmake-bringup
- In the future, DO NOT under any circumstances branch another branch. This leads to merge problems!

svn path=/branches/usb-bringup-trunk/; revision=55018
2012-01-20 20:58:46 +00:00

63 lines
1.3 KiB
C

/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS Win32 Base API
* FILE: dll/win32/kernel32/client/perfcnt.c
* PURPOSE: Performance Counter
* PROGRAMMER: Eric Kohl
*/
/* INCLUDES *******************************************************************/
#include <k32.h>
#define NDEBUG
#include <debug.h>
/* FUNCTIONS ******************************************************************/
/*
* @implemented
*/
BOOL
WINAPI
QueryPerformanceCounter(OUT PLARGE_INTEGER lpPerformanceCount)
{
LARGE_INTEGER Frequency;
NTSTATUS Status;
Status = NtQueryPerformanceCounter(lpPerformanceCount, &Frequency);
if (!Frequency.QuadPart) Status = STATUS_NOT_IMPLEMENTED;
if (!NT_SUCCESS(Status))
{
BaseSetLastNTError(Status);
return FALSE;
}
return TRUE;
}
/*
* @implemented
*/
BOOL
WINAPI
QueryPerformanceFrequency(OUT PLARGE_INTEGER lpFrequency)
{
LARGE_INTEGER Count;
NTSTATUS Status;
Status = NtQueryPerformanceCounter(&Count, lpFrequency);
if (!Count.QuadPart) Status = STATUS_NOT_IMPLEMENTED;
if (!NT_SUCCESS(Status))
{
BaseSetLastNTError(Status);
return FALSE;
}
return TRUE;
}
/* EOF */