On 6 Sep 2000, at 21:58, Adrian Chadd <adrian@creative.net.au> wrote:
> On Mon, Sep 04, 2000, Andres Kroonmaa wrote:
> >
> > --enable-time-hack option is broken and mostly useless.
>
> Hrm. That makes sense. How about you throw together a patch and if we're
> all in rough agreement (ie noone says anything bad) I'll look at committing
> it.
Maybe we should make ALARM_UPDATES_TIME define as a default. Maybe we could
enclose ALARM_UPDATES_TIME between #if USE_ASYNC_IO in comm*.c
But I really don't see any point in current implemenation in comm*.c.
To make an ideal one would take some effort. Is it worth it? gettimeofday()
should be a fast call these days. It shouldn't even call kernel.
--- comm_select.c.orig Mon May 22 13:15:10 2000
+++ comm_select.c Fri Aug 25 21:29:35 2000
@@ -224,7 +224,7 @@
}
if (!nfds)
return -1;
-#if !ALARM_UPDATES_TIME
+#if !ALARM_UPDATES_TIME_HACK
getCurrentTime();
#endif
Counter.syscalls.polls++;
@@ -325,7 +325,7 @@
static time_t last_timeout = 0;
double timeout = current_dtime + (msec / 1000.0);
do {
-#if !ALARM_UPDATES_TIME
+#if !ALARM_UPDATES_TIME_HACK
double start;
getCurrentTime();
start = current_dtime;
@@ -506,7 +506,7 @@
}
}
#endif
-#if !ALARM_UPDATES_TIME
+#if !ALARM_UPDATES_TIME_HACK
getCurrentTime();
Counter.select_time += (current_dtime - start);
#endif
@@ -546,7 +546,7 @@
}
if (maxfd++ == 0)
return -1;
-#if !ALARM_UPDATES_TIME
+#if !ALARM_UPDATES_TIME_HACK
getCurrentTime();
#endif
Counter.syscalls.selects++;
@@ -658,7 +658,7 @@
double timeout = current_dtime + (msec / 1000.0);
fde *F;
do {
-#if !ALARM_UPDATES_TIME
+#if !ALARM_UPDATES_TIME_HACK
getCurrentTime();
#endif
#if USE_ASYNC_IO
------------------------------------
Andres Kroonmaa <andre@online.ee>
Delfi Online
Tel: 6501 731, Fax: 6501 708
Pärnu mnt. 158, Tallinn,
11317 Estonia
Received on Thu Sep 07 2000 - 02:34:41 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:12:36 MST