[Libav-user] Best way to create a fractional ms timer?
nicolas.george at normalesup.org
Mon Apr 1 12:07:34 CEST 2013
Le duodi 12 germinal, an CCXXI, René J.V. Bertin a écrit :
> I presume MS Windows still doesn't provide timers with <1ms resolution, be
> it event-based or something like usleep/nanosleep? I haven't seen your
> original post, but I've already struggled myself to get reliable 1kHz
> realtime behaviour without external hardware. I ended up with a busy-wait
> loop, (hogging the CPU was acceptable in my case).
Basic sanity check: I hope everyone here realizes that on a non-real time
OS, even a timer with that kind of nominal precision can end up waiting a
few dozens milliseconds because the screen saver activated or a page was
needed from the swap? Modern hardware, with multicore CPUs and loads of
memory, make this less severe a problem, but you still get no guarantee at
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: Digital signature
More information about the Libav-user