git://git.exim.org
/
exim.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5fae29d
)
Handle kernels not providing microsecond time resolution
author
Samuel Thibault
<samuel.thibault@ens-lyon.org>
Fri, 13 Dec 2019 00:41:01 +0000
(
00:41
+0000)
committer
Jeremy Harris
<jgh146exb@wizmail.org>
Fri, 13 Dec 2019 00:41:56 +0000
(
00:41
+0000)
src/src/exim.c
patch
|
blob
|
history
diff --git
a/src/src/exim.c
b/src/src/exim.c
index 8c3c8e7ed3c2fff003cda2429fa283b4b88bc598..72bf65e72c6c8ee5850cbd75787dfafe99e08522 100644
(file)
--- a/
src/src/exim.c
+++ b/
src/src/exim.c
@@
-407,7
+407,7
@@
long int now_true_usec;
now_true_usec = now_tv.tv_usec;
now_tv.tv_usec = (now_true_usec/resolution) * resolution;
now_true_usec = now_tv.tv_usec;
now_tv.tv_usec = (now_true_usec/resolution) * resolution;
-
if
(exim_tvcmp(&now_tv, then_tv) <= 0)
+
while
(exim_tvcmp(&now_tv, then_tv) <= 0)
{
struct itimerval itval;
itval.it_interval.tv_sec = 0;
{
struct itimerval itval;
itval.it_interval.tv_sec = 0;
@@
-439,6
+439,13
@@
if (exim_tvcmp(&now_tv, then_tv) <= 0)
}
milliwait(&itval);
}
milliwait(&itval);
+
+ /* Be prapared to go around if the kernel does not implement subtick
+ granularity (GNU Hurd) */
+
+ (void)gettimeofday(&now_tv, NULL);
+ now_true_usec = now_tv.tv_usec;
+ now_tv.tv_usec = (now_true_usec/resolution) * resolution;
}
}
}
}