diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2007-04-01 12:22:25 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2007-04-01 12:22:25 +0000 |
commit | 41f8f990efc8d5dfec2fd2d609f1a001c4ee64c5 (patch) | |
tree | 36f45ef827616cdb8d1e8752fad928c645b34f81 /sys | |
parent | b12eb4c5f15742cce10ec4f784654be70f2315f2 (diff) |
Fix DEBUG built.
ok art@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/sparc64/sparc64/clock.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/arch/sparc64/sparc64/clock.c b/sys/arch/sparc64/sparc64/clock.c index 6273543f326..4d135e41581 100644 --- a/sys/arch/sparc64/sparc64/clock.c +++ b/sys/arch/sparc64/sparc64/clock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clock.c,v 1.29 2007/03/19 14:04:04 art Exp $ */ +/* $OpenBSD: clock.c,v 1.30 2007/04/01 12:22:24 kettenis Exp $ */ /* $NetBSD: clock.c,v 1.41 2001/07/24 19:29:25 eeh Exp $ */ /* @@ -807,17 +807,19 @@ clockintr(cap) { #ifdef DEBUG static int64_t tick_base = 0; + struct timeval ctime; int64_t t; t = tick() & TICK_TICKS; + microtime(&ctime); if (!tick_base) { - tick_base = (time_second * 1000000LL + time.tv_usec) + tick_base = (ctime.tv_sec * 1000000LL + ctime.tv_usec) * 1000000LL / cpu_clockrate; tick_base -= t; } else if (clockcheck) { int64_t tk = t; - int64_t clk = (time.tv_sec * 1000000LL + time.tv_usec); + int64_t clk = (ctime.tv_sec * 1000000LL + ctime.tv_usec); t -= tick_base; t = t * 1000000LL / cpu_clockrate; if (t - clk > hz) { |