Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "Windows.h"
- long long milliseconds_now() {
- static LARGE_INTEGER s_frequency;
- static BOOL s_use_qpc = QueryPerformanceFrequency(&s_frequency);
- if (s_use_qpc) {
- LARGE_INTEGER now;
- QueryPerformanceCounter(&now);
- return (1000LL * now.QuadPart) / s_frequency.QuadPart;
- }
- else {
- return GetTickCount();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement