summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2008-09-19 23:36:25 +0000
committerDamien Miller <djm@cvs.openbsd.org>2008-09-19 23:36:25 +0000
commit1a9002363bbc2df688fa0fb5fab87e0977e5499e (patch)
tree50f357e7e381931fbda70b01271a3590aaa605e3 /sys
parente8a997d4b9c1ae9ccf4fe47f39a0207e2b04546e (diff)
system/5918: fix clearing of ITIMER_VIRTUAL and ITIMER_PROF it_interval
ok tedu@
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/kern_time.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/kern/kern_time.c b/sys/kern/kern_time.c
index 3fa6e524b6e..2f407187375 100644
--- a/sys/kern/kern_time.c
+++ b/sys/kern/kern_time.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_time.c,v 1.64 2008/04/04 22:48:02 dlg Exp $ */
+/* $OpenBSD: kern_time.c,v 1.65 2008/09/19 23:36:24 djm Exp $ */
/* $NetBSD: kern_time.c,v 1.20 1996/02/18 11:57:06 fvdl Exp $ */
/*
@@ -688,13 +688,13 @@ itimerfix(struct timeval *tv)
}
/*
- * Timer interval smaller than the resolution of the system clock are
- * rounded up.
+ * Nonzero timer interval smaller than the resolution of the
+ * system clock are rounded up.
*/
void
itimerround(struct timeval *tv)
{
- if (tv->tv_sec == 0 && tv->tv_usec < tick)
+ if (tv->tv_sec == 0 && tv->tv_usec != 0 && tv->tv_usec < tick)
tv->tv_usec = tick;
}