36#define STEPS_PER_CYCLE 1024
56 static INT NumCalls = 0;
119 if (CurrentTickCount <= Timer->LastTick.LowPart)
continue;
123 if (Ticks == 0)
continue;
126 Timer->Callback(Ticks);
135 Timer->LastTick.QuadPart += Ticks *
Timer->Delay;
151 Timer->Flags =
Flags & ~HARDWARE_TIMER_ENABLED;
152 Timer->EnableCount = 0;
154 Timer->LastTick.QuadPart = 0;
164 Timer->EnableCount++;
186 Timer->EnableCount--;
192 Timer->Flags &= ~HARDWARE_TIMER_ENABLED;
206 Timer->Delay = NewDelay / 1000000ULL;
228 wprintf(
L"FATAL: Performance counter not available\n");
238 wprintf(
L"FATAL: Cannot create IPS timer.\n");
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
BOOLEAN NTAPI RtlFreeHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID HeapBase)
#define HARDWARE_TIMER_ENABLED
#define HARDWARE_TIMER_ONESHOT
VOID(FASTCALL * PHARDWARE_TIMER_PROC)(ULONGLONG ElapsedTime)
#define HARDWARE_TIMER_PRECISE
DWORD WINAPI GetTickCount(VOID)
#define RemoveEntryList(Entry)
#define InsertTailList(ListHead, Entry)
#define InitializeListHead(ListHead)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
NTSTATUS NTAPI NtQueryPerformanceCounter(OUT PLARGE_INTEGER PerformanceCounter, OUT PLARGE_INTEGER PerformanceFrequency OPTIONAL)
base of all file and directory entries
struct _LIST_ENTRY * Flink
static VOID FASTCALL IpsCallback(ULONGLONG ElapsedTime)
PHARDWARE_TIMER CreateHardwareTimer(ULONG Flags, ULONGLONG Delay, PHARDWARE_TIMER_PROC Callback)
VOID DisableHardwareTimer(PHARDWARE_TIMER Timer)
BOOLEAN ClockInitialize(VOID)
static LARGE_INTEGER StartPerfCount
VOID DestroyHardwareTimer(PHARDWARE_TIMER Timer)
static LARGE_INTEGER Frequency
static LARGE_INTEGER Counter
static PHARDWARE_TIMER IpsTimer
VOID EnableHardwareTimer(PHARDWARE_TIMER Timer)
static ULONG CurrentTickCount
ULONGLONG CurrentCycleCount
VOID SetHardwareTimerDelay(PHARDWARE_TIMER Timer, ULONGLONG NewDelay)
static ULONGLONG LastCycles
#define CONTAINING_RECORD(address, type, field)
static int Link(const char **args)
_In_ WDFINTERRUPT _In_ PFN_WDF_INTERRUPT_SYNCHRONIZE Callback
_Must_inspect_result_ _In_ ULONG Flags