ReactOS  0.4.13-dev-551-gf37fb1f
perfcnt.c File Reference
#include <k32.h>
#include <debug.h>
Include dependency graph for perfcnt.c:

Go to the source code of this file.

Macros

#define NDEBUG
 

Functions

BOOL WINAPI QueryPerformanceCounter (OUT PLARGE_INTEGER lpPerformanceCount)
 
BOOL WINAPI QueryPerformanceFrequency (OUT PLARGE_INTEGER lpFrequency)
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 13 of file perfcnt.c.

Function Documentation

◆ QueryPerformanceCounter()

BOOL WINAPI QueryPerformanceCounter ( OUT PLARGE_INTEGER  lpPerformanceCount)

Definition at line 23 of file perfcnt.c.

24 {
27 
28  Status = NtQueryPerformanceCounter(lpPerformanceCount, &Frequency);
30 
31  if (!NT_SUCCESS(Status))
32  {
34  return FALSE;
35  }
36 
37  return TRUE;
38 }
#define TRUE
Definition: types.h:120
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:225
LONG NTSTATUS
Definition: precomp.h:26
NTSTATUS NTAPI NtQueryPerformanceCounter(OUT PLARGE_INTEGER PerformanceCounter, OUT PLARGE_INTEGER PerformanceFrequency OPTIONAL)
Definition: profile.c:278
DWORD BaseSetLastNTError(IN NTSTATUS Status)
Definition: reactos.cpp:166
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
Status
Definition: gdiplustypes.h:24
static LARGE_INTEGER Frequency
Definition: clock.c:41
LONGLONG QuadPart
Definition: typedefs.h:112

Referenced by __security_init_cookie(), CookupNodeId(), currenttime_us(), GetPerfTime(), GetSecondsQPC(), main(), QueryTime(), Timer::restart(), Timer::start(), Timer::stop(), SystemFunction036(), test_clock(), test_RegQueryValueExPerformanceData(), wined3d_get_adapter_raster_status(), and xsltTimestamp().

◆ QueryPerformanceFrequency()

BOOL WINAPI QueryPerformanceFrequency ( OUT PLARGE_INTEGER  lpFrequency)

Definition at line 45 of file perfcnt.c.

46 {
49 
50  Status = NtQueryPerformanceCounter(&Count, lpFrequency);
51  if (lpFrequency->QuadPart == 0) Status = STATUS_NOT_IMPLEMENTED;
52 
53  if (!NT_SUCCESS(Status))
54  {
56  return FALSE;
57  }
58 
59  return TRUE;
60 }
#define TRUE
Definition: types.h:120
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:225
LONG NTSTATUS
Definition: precomp.h:26
NTSTATUS NTAPI NtQueryPerformanceCounter(OUT PLARGE_INTEGER PerformanceCounter, OUT PLARGE_INTEGER PerformanceFrequency OPTIONAL)
Definition: profile.c:278
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1015
DWORD BaseSetLastNTError(IN NTSTATUS Status)
Definition: reactos.cpp:166
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
Status
Definition: gdiplustypes.h:24

Referenced by currenttime_us(), GetPerfTime(), GetSecondsQPC(), main(), test_clock(), test_RegQueryValueExPerformanceData(), Timer::Timer(), wined3d_get_adapter_raster_status(), wmain(), and xsltTimestamp().