![](HTTP://WWW.HETRIX.COM/resistphirebat.jpg)
Im writing a music proggy that uses dlls etc so ppl can use it in their games by linkin it. i need to use some kind of timer thats deadly accurate and sure-fire, because it runs externally from the main application, i cant use sleep() or anything like that. im told the windows timers are unreliable and not accurate enough. ne1?
http://www.xeodus.com
![](HTTP://WWW.HETRIX.COM/resistphirebat.jpg)
<a href="http://www.gatethrasher.150m.com>GATETHRASHER FOREVER!!!!
what type of output does it use? wave mapper, dsound? If dsound u can just setup a playbuffer notification and it will handle callbacks to fill your buffer, otherwise u could use
timeBeginPeriod(1);
timeGetTime(); // get time in MS
timeEndPeriod(1);
to get a pretty accurate windows timer.
It uses directsound
![](HTTP://WWW.HETRIX.COM/resistphirebat.jpg)
http://www.xeodus.com
![](HTTP://WWW.HETRIX.COM/resistphirebat.jpg)
http://www.xeodus.com
<a href="http://www.gatethrasher.150m.com>GATETHRASHER FOREVER!!!!
The performance counter is the most accurate timer. Its supported on Pentiums and upwards. Use QueryPerformanceFrequency() to get the frequency of the timer in counts per second and QueryPerformanceCounter() to get the count.
www.elf-stone.com
www.elf-stone.com
____________________________________________________________www.elf-stone.com | Automated GL Extension Loading: GLee 5.00 for Win32 and Linux
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement