From f4bbdc7da6e18ffed99f492f7865dcaf729ff629 Mon Sep 17 00:00:00 2001 From: ache Date: Thu, 24 Mar 1994 22:23:51 +0000 Subject: 1) After discussion with Hannu, returning speed changed back. Real problem fixed by my previous fix for SB 2.x 2) get_time function slightly modified to minimize possible overflowing. --- sys/i386/isa/sound/soundcard.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'sys/i386/isa/sound/soundcard.c') diff --git a/sys/i386/isa/sound/soundcard.c b/sys/i386/isa/sound/soundcard.c index 36b5a1e..dae5a54 100644 --- a/sys/i386/isa/sound/soundcard.c +++ b/sys/i386/isa/sound/soundcard.c @@ -73,11 +73,12 @@ get_time() { extern struct timeval time; struct timeval timecopy; -int x = splclock(); - +int x; + + x = splclock(); timecopy = time; splx(x); - return ((unsigned long)timecopy.tv_usec*HZ)/1000000 + + return timecopy.tv_usec/(1000000/HZ) + (unsigned long)timecopy.tv_sec*HZ; } -- cgit v1.1