summaryrefslogtreecommitdiff
path: root/ev_select.c
diff options
context:
space:
mode:
authorroot <root>2011-06-02 23:34:05 +0000
committerroot <root>2011-06-02 23:34:05 +0000
commitb31cc1b7e254fb3aea85cd551aec6feb39cb3eef (patch)
tree4cf06067d3ae3d2aab303b1baead7fea445d3422 /ev_select.c
parentdb116f08bb7e331dfbd14ead7bd5ce77344c2c6a (diff)
verify backend fudge factors by reading kernel sources
Diffstat (limited to 'ev_select.c')
-rw-r--r--ev_select.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/ev_select.c b/ev_select.c
index 0ea9467..fdf2adc 100644
--- a/ev_select.c
+++ b/ev_select.c
@@ -195,7 +195,12 @@ select_poll (EV_P_ ev_tstamp timeout)
*/
if (errno == EINVAL)
{
- ev_sleep (timeout);
+ if (timeout)
+ {
+ unsigned long ms = timeout * 1e3;
+ Sleep (ms ? ms : 1);
+ }
+
return;
}
#endif
@@ -269,7 +274,7 @@ select_poll (EV_P_ ev_tstamp timeout)
int inline_size
select_init (EV_P_ int flags)
{
- backend_fudge = 0.; /* posix says this is zero */
+ backend_fudge = 1e-6;
backend_modify = select_modify;
backend_poll = select_poll;
@@ -307,4 +312,3 @@ select_destroy (EV_P)
#endif
}
-