Advertisement

Timers

Started by April 15, 2001 08:03 AM
2 comments, last by PhireBat 23 years, 9 months ago
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
<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.



Advertisement
It uses directsound


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 | Automated GL Extension Loading: GLee 5.00 for Win32 and Linux

This topic is closed to new replies.

Advertisement