Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site phri.UUCP Path: utzoo!utcs!mnetor!lsuc!pesnta!phri!roy From: roy@phri.UUCP (Roy Smith) Newsgroups: net.unix-wizards Subject: Re: bsd4.2 on 11/785 Message-ID: <525@phri.UUCP> Date: Thu, 17-Oct-85 10:55:03 EDT Article-I.D.: phri.525 Posted: Thu Oct 17 10:55:03 1985 Date-Received: Fri, 18-Oct-85 11:54:21 EDT References: <1513@srcsip.UUCP> <3252@nsc.UUCP> Organization: Public Health Research Inst. (NY, NY) Lines: 17 > there really ought to be a way to build a decent > delay routine without making processor speed assumptions > Chuq Von Rospach (Currently: nsc!chuqui@decwrl.ARPA) How about during the (very) early boot stages, you set a hardware real-time timer for 1 second then start counting up from zero? When you get the interrupt you have the speed of the processor in trivial_for_loops per second. Divide this by 1000, save the result, and you can then calculate processor-independent ms-range delay loops whenever you have to. This doesn't help if you really want a delay *macro*, but I'm assuming that if you want a 5ms delay, you don't care about the function call overhead. -- Roy Smith System Administrator, Public Health Research Institute 455 First Avenue, New York, NY 10016