Posted on 2003-11-10
Platform : Win2K Pro/SP4, VC7/WinMM
I need some hi-resolution timers. (ranging 10ms to 25 ms). I know Windows may not be be able to maintain that resolution, but I can manage that. But the real problem is sometimes I get an error when calling timeSetEvent() function (Time ID NULL). I went thru MSDN real quick and I could not find any method to see the reason why it failed.
This is what I do.
I have several streaming data channels (UDP).
Every channel has a timer object for data dispatch.
These channels could stop start timers at any time (normally they just keep running).
I call timeSetEvent() on every channel object at beginning. (timer resolution 23 ms for testing)
It works fine for ~20 channels.
The rest fails on tiemSetEvent()
I checked timeCaps. (min resolution 1ms)
Any idea whats wrong ?? Is there a limitation for timesetEvent() ???