Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/i386/i386 when evaluating CPU speed, make the wait ...



details:   https://anonhg.NetBSD.org/src/rev/ddfdf6ec6e58
branches:  trunk
changeset: 499158:ddfdf6ec6e58
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Mon Nov 13 16:40:40 2000 +0000

description:
when evaluating CPU speed, make the wait 0.1s instead of 1s - the accuracy
difference is like 0.008% on my system and the delay is now almost unnoticable:)
Discussed with Jason Thorpe, Frank van den Linden.

diffstat:

 sys/arch/i386/i386/machdep.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (20 lines):

diff -r d9f6637b0631 -r ddfdf6ec6e58 sys/arch/i386/i386/machdep.c
--- a/sys/arch/i386/i386/machdep.c      Mon Nov 13 15:31:44 2000 +0000
+++ b/sys/arch/i386/i386/machdep.c      Mon Nov 13 16:40:40 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.412 2000/11/10 04:00:25 enami Exp $      */
+/*     $NetBSD: machdep.c,v 1.413 2000/11/13 16:40:40 jdolecek Exp $   */
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2000 The NetBSD Foundation, Inc.
@@ -1046,8 +1046,8 @@
                u_int64_t last_tsc;
 
                last_tsc = rdtsc();
-               delay(1000000);
-               cpu_tsc_freq = rdtsc() - last_tsc;
+               delay(100000);
+               cpu_tsc_freq = (rdtsc() - last_tsc) * 10;
        }
 #endif
 }



Home | Main Index | Thread Index | Old Index