Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static long long timestamp()
- {
- //From http://gamedev.stackexchange.com/questions/26759/best-way-to-get-elapsed-time-in-miliseconds-in-windows
- 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