From: tholo Date: Sun, 28 Apr 1996 21:11:19 +0000 (+0000) Subject: Only use Pentium instruction counter of we have been compiled with NTP X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=bf29045d2e2714bb3b23720b6a10d1d3b966e891;p=openbsd Only use Pentium instruction counter of we have been compiled with NTP support, otherwise we won't get the counter reset at the top of every second and will return highly inaccurate values. --- diff --git a/sys/arch/i386/i386/microtime.s b/sys/arch/i386/i386/microtime.s index 918a9de229c..c3ebff8c3f6 100644 --- a/sys/arch/i386/i386/microtime.s +++ b/sys/arch/i386/i386/microtime.s @@ -1,4 +1,4 @@ -/* $OpenBSD: microtime.s,v 1.4 1996/03/19 21:09:20 mickey Exp $ */ +/* $OpenBSD: microtime.s,v 1.5 1996/04/28 21:11:19 tholo Exp $ */ /* $NetBSD: microtime.s,v 1.16 1995/04/17 12:06:47 cgd Exp $ */ /*- @@ -48,7 +48,7 @@ #ifndef HZ ENTRY(microtime) -#ifdef I586_CPU +#if defined(I586_CPU) && defined(NTP) movl _pentium_mhz, %ecx testl %ecx, %ecx jne pentium_microtime @@ -138,7 +138,7 @@ common_microtime: ret -#ifdef I586_CPU +#if defined(I586_CPU) && defined(NTP) .align 2, 0x90 pentium_microtime: cli