[Live-devel] gettimeofday windows implementation

Ross Finlayson finlayson at live555.com
Fri Aug 20 18:10:30 PDT 2010


>I would like to modify the gettimeofday implementation (provided for 
>Windoze) in groupsockhelper.cpp to make it thread safe for my use.

I hope you have read the FAQ entry about threads.


>I noticed the comments for the routine that QueryPerformanceCounter 
>is more accurate that's why you use it. My question is if I use 
>ftime in each call what kind of side effects will it cause if any?

It will likely cause your application to perform badly, because timed 
events will happen at too coarse a granularity.

I don't recommend changing the current implementation.  If you really 
want to make it accessible by multiple threads (for whatever reason), 
then I suggest placing locks around the implementation, or else 
writing a new version (with a different name) that could you use just 
from your non-LIVE555 threads.
-- 

Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20100821/c1fb4e69/attachment.html>


More information about the live-devel mailing list