<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Dec 25, 2013 at 6:09 PM, Jonathan Ben Avraham <span dir="ltr"><<a href="mailto:yba@tkos.co.il" target="_blank">yba@tkos.co.il</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Erez,<br>
Depends on what resolution you want. See <a href="http://lwn.net/Articles/296578/" target="_blank">http://lwn.net/Articles/<u></u>296578/</a> for some background. I doubt that Android can interfere in any way except to affect latency in general. What about using an hrtimer?<br>
<br></blockquote><div>thanks<br><br></div><div>just FYI, i expected select to sleep for 2 seconds, it slept for 20 seconds. this is the resolution of the problem. <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
- yba<br>
<br>
<br>
On Wed, 25 Dec 2013, Erez D wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Date: Wed, 25 Dec 2013 17:27:46 +0200<br>
From: Erez D <<a href="mailto:erez0001@gmail.com" target="_blank">erez0001@gmail.com</a>><br>
To: linux-il <<a href="mailto:linux-il@cs.huji.ac.il" target="_blank">linux-il@cs.huji.ac.il</a>><br>
Subject: slept too long in select()<div><div class="h5"><br>
<br>
hello<br>
<br>
i've wrote a native c++ program on linux<br>
it uses select to wait on events.<br>
<br>
<br>
int n=select(maxFd+1,&rfd,&wfds,<u></u>NULL, &timeval);<br>
<br>
some times, time spent in select() is larger than the time originally in timeval prior to<br>
calling select.<br>
i see that many time when i run it on my phone (android).<br>
<br>
is it possible that android uses some machanism to susspend and resume native code<br>
(i know it does so to java)<br>
if so, how can i overcome it ?<br>
<br>
<br>
thanks,<br>
erez.<br>
<br>
<br>
<br>
</div></div></blockquote><span class="HOEnZb"><font color="#888888">
<br>
-- <br>
9590 8E58 D30D 1660 C349 673D B205 4FC4 B8F5 B7F9 ~. .~ Tk Open Systems<br>
=}----------------------------<u></u>--------------------ooO--U--<u></u>Ooo------------{=<br>
mailto:<a href="mailto:yba@tkos.co.il" target="_blank">yba@tkos.co.il</a> tel:<a href="tel:%2B972.52.486.3386" value="+972524863386" target="_blank">+972.52.486.3386</a> <a href="http://tkos.co.il" target="_blank">http://tkos.co.il</a> skype:benavrhm</font></span><br>
_______________________________________________<br>
Linux-il mailing list<br>
<a href="mailto:Linux-il@cs.huji.ac.il">Linux-il@cs.huji.ac.il</a><br>
<a href="http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il" target="_blank">http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il</a><br>
<br></blockquote></div><br></div></div>