summaryrefslogtreecommitdiff
path: root/event.c
diff options
context:
space:
mode:
authorroot <root>2010-05-10 20:01:45 +0000
committerroot <root>2010-05-10 20:01:45 +0000
commitc4d4d77af33fe5c42a85ad781059e2eabcca14d3 (patch)
tree288b966e06d096d0a5f640e1c7f2f1fc8b6dd400 /event.c
parent66262f3aa28b34b483430dbe9250966274a4cb06 (diff)
*** empty log message ***
Diffstat (limited to 'event.c')
-rw-r--r--event.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/event.c b/event.c
index fae26bb..4124769 100644
--- a/event.c
+++ b/event.c
@@ -74,7 +74,10 @@ static ev_tstamp
ev_tv_get (struct timeval *tv)
{
if (tv)
- return tv->tv_sec + tv->tv_usec * 1e-6;
+ {
+ ev_tstamp after = tv->tv_sec + tv->tv_usec * 1e-6;
+ return after ? after : 1e-6;
+ }
else
return -1.;
}