summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_time.c
diff options
context:
space:
mode:
authordjm <djm@openbsd.org>2008-09-19 23:36:24 +0000
committerdjm <djm@openbsd.org>2008-09-19 23:36:24 +0000
commitf17a020ebeb3d7c02b2c08b0397d7793793879c5 (patch)
treebfb729cacc07168f4a8c09fd2185570c03b7cc82 /sys/kern/kern_time.c
parentadjust for MAXINTERP crank, pointed out by dkrause@ (diff)
downloadwireguard-openbsd-f17a020ebeb3d7c02b2c08b0397d7793793879c5.tar.xz
wireguard-openbsd-f17a020ebeb3d7c02b2c08b0397d7793793879c5.zip
system/5918: fix clearing of ITIMER_VIRTUAL and ITIMER_PROF it_interval
ok tedu@
Diffstat (limited to 'sys/kern/kern_time.c')
-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;
}