diff options
author | ache <ache@FreeBSD.org> | 1994-03-24 22:23:51 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1994-03-24 22:23:51 +0000 |
commit | f4bbdc7da6e18ffed99f492f7865dcaf729ff629 (patch) | |
tree | e52bc9806f3ef874fc2311a78b9c781227cb4bdb /sys/i386/isa/sound/soundcard.c | |
parent | 2f48f24d378d175cee9b6b47d4846f7225d93f1b (diff) | |
download | FreeBSD-src-f4bbdc7da6e18ffed99f492f7865dcaf729ff629.zip FreeBSD-src-f4bbdc7da6e18ffed99f492f7865dcaf729ff629.tar.gz |
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.
Diffstat (limited to 'sys/i386/isa/sound/soundcard.c')
-rw-r--r-- | sys/i386/isa/sound/soundcard.c | 7 |
1 files changed, 4 insertions, 3 deletions
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; } |