reactos/dll/win32/kernel32/client/perfcnt.c
Hermès Bélusca-Maïto 9393fc320e
[FORMATTING] Remove trailing whitespace. Addendum to 34593d93.
Excluded: 3rd-party code (incl. wine) and most of the win32ss.
2021-09-13 03:52:22 +02:00

62 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 == 0) 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 (lpFrequency->QuadPart == 0) Status = STATUS_NOT_IMPLEMENTED;
if (!NT_SUCCESS(Status))
{
BaseSetLastNTError(Status);
return FALSE;
}
return TRUE;
}
/* EOF */