Skip to content

Instantly share code, notes, and snippets.

@bzoz
Created May 7, 2020 17:25
Show Gist options
  • Save bzoz/b9f942425007a0f834cae2dcc253f1df to your computer and use it in GitHub Desktop.
Save bzoz/b9f942425007a0f834cae2dcc253f1df to your computer and use it in GitHub Desktop.
#include <windows.h>
#include <stdio.h>
int main() {
LARGE_INTEGER prev, next;
BOOL r;
QueryPerformanceCounter(&prev);
for (;;) {
r = QueryPerformanceCounter(&next);
if (r == 0 || next.QuadPart < prev.QuadPart) {
printf("%d %lld %lld\n", r, next.QuadPart, prev.QuadPart);
}
prev = next;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment