From 1a9002363bbc2df688fa0fb5fab87e0977e5499e Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Fri, 19 Sep 2008 23:36:25 +0000 Subject: system/5918: fix clearing of ITIMER_VIRTUAL and ITIMER_PROF it_interval ok tedu@ --- sys/kern/kern_time.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sys') 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; } -- cgit v1.2.3