slept too long in select()
Erez D
erez0001 at gmail.com
Wed Dec 25 18:22:55 IST 2013
On Wed, Dec 25, 2013 at 6:09 PM, Jonathan Ben Avraham <yba at tkos.co.il>wrote:
> Hi Erez,
> Depends on what resolution you want. See http://lwn.net/Articles/296578/for some background. I doubt that Android can interfere in any way except
> to affect latency in general. What about using an hrtimer?
>
> thanks
just FYI, i expected select to sleep for 2 seconds, it slept for 20
seconds. this is the resolution of the problem.
> - yba
>
>
> On Wed, 25 Dec 2013, Erez D wrote:
>
> Date: Wed, 25 Dec 2013 17:27:46 +0200
>> From: Erez D <erez0001 at gmail.com>
>> To: linux-il <linux-il at cs.huji.ac.il>
>> Subject: slept too long in select()
>>
>>
>> hello
>>
>> i've wrote a native c++ program on linux
>> it uses select to wait on events.
>>
>>
>> int n=select(maxFd+1,&rfd,&wfds,NULL, &timeval);
>>
>> some times, time spent in select() is larger than the time originally in
>> timeval prior to
>> calling select.
>> i see that many time when i run it on my phone (android).
>>
>> is it possible that android uses some machanism to susspend and resume
>> native code
>> (i know it does so to java)
>> if so, how can i overcome it ?
>>
>>
>> thanks,
>> erez.
>>
>>
>>
>>
> --
> 9590 8E58 D30D 1660 C349 673D B205 4FC4 B8F5 B7F9 ~. .~ Tk Open Systems
> =}------------------------------------------------ooO--U--
> Ooo------------{=
> mailto:yba at tkos.co.il tel:+972.52.486.3386 http://tkos.co.ilskype:benavrhm
> _______________________________________________
> Linux-il mailing list
> Linux-il at cs.huji.ac.il
> http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.cs.huji.ac.il/pipermail/linux-il/attachments/20131225/b04561a8/attachment.html>
More information about the Linux-il
mailing list