Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/alpha/alpha Correct microtime() to use the microsec...
details: https://anonhg.NetBSD.org/src/rev/d516d6437711
branches: trunk
changeset: 509213:d516d6437711
user: sommerfeld <sommerfeld%NetBSD.org@localhost>
date: Sun Apr 29 17:04:41 2001 +0000
description:
Correct microtime() to use the microsecond part of the base timestamp.
diffstat:
sys/arch/alpha/alpha/microtime.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r f4313866f5c5 -r d516d6437711 sys/arch/alpha/alpha/microtime.c
--- a/sys/arch/alpha/alpha/microtime.c Sun Apr 29 15:20:55 2001 +0000
+++ b/sys/arch/alpha/alpha/microtime.c Sun Apr 29 17:04:41 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: microtime.c,v 1.1 2001/04/28 06:10:49 thorpej Exp $ */
+/* $NetBSD: microtime.c,v 1.2 2001/04/29 17:04:41 sommerfeld Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -54,7 +54,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: microtime.c,v 1.1 2001/04/28 06:10:49 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: microtime.c,v 1.2 2001/04/29 17:04:41 sommerfeld Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -102,7 +102,7 @@
usec = (alpha_rpcc() & 0xffffffffUL) - ci->ci_pcc_pcc;
if (usec < 0)
usec += 0x100000000L;
- t.tv_usec = (usec * ci->ci_pcc_ms_delta) / ci->ci_pcc_denom;
+ t.tv_usec += (usec * ci->ci_pcc_ms_delta) / ci->ci_pcc_denom;
while (t.tv_usec >= 1000000) {
t.tv_usec -= 1000000;
t.tv_sec++;
@@ -199,7 +199,7 @@
ci->ci_pcc_denom = denom;
} else {
#if 0
- printf("microset: delta %d, resetting state\n", delta);
+ printf("microset: delta %ld, resetting state\n", delta);
#endif
ci->ci_pcc_ms_delta = 1000000;
ci->ci_pcc_denom = hwrpb->rpb_cc_freq;
Home |
Main Index |
Thread Index |
Old Index