Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

timer_win32.cpp

Go to the documentation of this file.
00001 #include <windows.h>
00002 #include <mmsystem.h>
00003 #include "timer.hpp"
00004 
00005 
00006 adr_u64 GetNow() {
00007   // get frequency of the performance counter
00008   LARGE_INTEGER frequency;
00009   if (QueryPerformanceFrequency(&frequency) && frequency.QuadPart != 0) {
00010     LARGE_INTEGER now;
00011     if (QueryPerformanceCounter(&now)) {
00012       return 1000000 * adr_u64(now.QuadPart) / frequency.QuadPart;
00013     }
00014   }
00015 
00016   // no performance counter, so use the Win32 multimedia timer
00017   return timeGetTime() * 1000;
00018 }

Generated at Mon Jun 10 02:55:13 2002 for audiere by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001