diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2006-05-09 09:40:51 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2006-05-09 09:40:51 +0000 |
commit | 8074710c1c46ae43d46c5d47f8a09a24ae9ebe35 (patch) | |
tree | bb1b6081f4f9356f1a0a9cb2f5583b4026956891 /sys/arch | |
parent | bc70516ce7fda275ee07d2df0c02fe967143c3ec (diff) |
Avoid estimating pentium_mhz too low, which has the effect of resulting
in non-monotonic time. Now the gettimeofday regression no longer
fails on my 500MHz PIII. ok toby@ mickey@
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/i386/isa/clock.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/i386/isa/clock.c b/sys/arch/i386/isa/clock.c index af7ce370ac3..24cd986b182 100644 --- a/sys/arch/i386/isa/clock.c +++ b/sys/arch/i386/isa/clock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clock.c,v 1.34 2006/02/12 19:55:39 miod Exp $ */ +/* $OpenBSD: clock.c,v 1.35 2006/05/09 09:40:50 otto Exp $ */ /* $NetBSD: clock.c,v 1.39 1996/05/12 23:11:54 mycroft Exp $ */ /*- @@ -392,7 +392,7 @@ calibrate_cyclecounter() __asm __volatile("rdtsc" : "=A" (last_count)); delay(1000000); __asm __volatile("rdtsc" : "=A" (count)); - pentium_mhz = ((count - last_count) + 500000) / 1000000; + pentium_mhz = ((count - last_count) + 999999) / 1000000; } #endif |