Timed I/O - How do I do it please ?

Tony Jewell jewell at tower-unix.city-poly.ac.uk
Sat Apr 27 10:00:00 AEST 1991


I'm currently in the process of designing a direct to disk recording
system - please bear with me, my C and Unix tend to flounder beyond a
simple system administration level.

To do some simple benchmarks, I'd like to read a 16bit integer from a file
once every 1/48000 seconds. How do I time this - utime doesn't have a low
enough resolution, and I don't understand setitimer. Basically I want to
do the following:

start timer
read integer
check timer
if done within 1/48000 secs
	go back to start
else
	report error
	go back to start

I'm currently using a Sun Sparc 1 running 4.1.1

Thank you in advance for your help.

        Tony Jewell
        JANET:	jewell at uk.ac.clp.unixa
        EARN/Bitnet: jewell at unixa.clp.ac.uk
        EAN:		jewell%clp.unixa at ean-relay.ac.uk




More information about the Comp.sys.sun mailing list