o Raphael Coeffic [06/04/08 12:48]:
> Stefan Sayer wrote:
>> Hi Raphael,
>>
>> even though the comment had been wrong before (2 us, not ms), I am not 
>> sure whether I would change this without testing the accuracy of the 
>> timer in high load situations. With the current value I have seen 
>> quite good accuracy, what were your results with the value of 2ms?
>>
>>   
> The point is that there is no need to go sleeping for 2 ms.... Most of 
> the time, calling nanosleep with such a value will end up in a very 
> expensive wait (under some circumstances, even an active wait based on 
> CPU loop...).
I don't think that is true any more for newer linux kernels, and most 
definitely not for high res timers kernel, which anyone running 
multimedia apps will probably have enabled.

Stefan

> 
> If you are unsure, you can of course, test this extensively, but i am 
> pretty sure that it is safe to correct this.
> 
> -Raphael.
>> Stefan
>>
>> o [EMAIL PROTECTED] [06/04/08 10:21]:
>>  
>>> Author: rco
>>> Date: 2008-06-04 10:21:07 +0200 (Wed, 04 Jun 2008)
>>> New Revision: 1004
>>>
>>> Modified:
>>>    branches/1.0.0/core/AmMediaProcessor.cpp
>>> Log:
>>> - fixed minor bug. (trunk 1002:1003)
>>>
>>>
>>> Modified: branches/1.0.0/core/AmMediaProcessor.cpp
>>> ===================================================================
>>> --- branches/1.0.0/core/AmMediaProcessor.cpp    2008-06-04 08:19:31 
>>> UTC (rev 1003)
>>> +++ branches/1.0.0/core/AmMediaProcessor.cpp    2008-06-04 08:21:07 
>>> UTC (rev 1004)
>>> @@ -204,7 +204,7 @@
>>>        sdiff.tv_sec  = diff.tv_sec;
>>>        sdiff.tv_nsec = diff.tv_usec * 1000;
>>>  
>>> -      if(sdiff.tv_nsec > 2000) // 2 ms
>>> +      if(sdiff.tv_nsec > 2000000) // 2 ms
>>>      nanosleep(&sdiff,&rem);
>>>      }
>>>  
>>>
>>> _______________________________________________
>>> Semsdev mailing list
>>> [email protected]
>>> http://lists.iptel.org/mailman/listinfo/semsdev
>>>     
>>
>>   
> 

-- 
Stefan Sayer
VoIP Services

[EMAIL PROTECTED]
www.iptego.com

iptego GmbH
Am Borsigturm 40
13507 Berlin
Germany

Amtsgericht Charlottenburg, HRB 101010
Geschaeftsfuehrer: Alexander Hoffmann
_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

Reply via email to