[Libav-user] Best way to create a fractional ms timer?

Alex Cohn alexcohn at netvision.net.il
Sat Mar 30 22:00:39 CET 2013


On Sat, Mar 30, 2013 at 4:22 PM, Mike Versteeg <mike at mikeversteeg.com> wrote:
> Are there any functions in libav* available that can help me create a
> fractional ms timer, say 33.33 ms? Windows is not offering this, and one can
> only achieve this by adding code to the timer event, code that can and will
> be interrupted by the scheduler. I prefer something more robust..

You can use select(http://msdn.microsoft.com/en-us/library/windows/desktop/ms740141(v=vs.85).aspx
) with dummy FDs and timeout at microsec precision.

BR,
Alex Cohn


More information about the Libav-user mailing list