Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!cmcl2!rutgers!sunybcs!boulder!cu-den!udenva!rneitzel From: rneitzel@udenva.cair.du.edu (RICHARD NEITZEL ) Newsgroups: comp.unix.questions,comp.unix.wizards Subject: Re: Delay with no real time clock Message-ID: <9292@udenva.cair.du.edu> Date: Tue, 27-Oct-87 09:26:35 EST Article-I.D.: udenva.9292 Posted: Tue Oct 27 09:26:35 1987 Date-Received: Thu, 29-Oct-87 22:21:27 EST References: <2414@masscomp.UUCP> Reply-To: rneitzel@udenva.UUCP (RICHARD NEITZEL ) Distribution: na Organization: U of Denver Lines: 27 Xref: mnetor comp.unix.questions:4683 comp.unix.wizards:5143 In article <2414@masscomp.UUCP> jeffrey@masscomp.UUCP (Jeff Jones) writes: >I am working with a driver that must wait for a specified period of >time (usually less than one second) after issuing a command before >assuming that a device is not present. This must happend during >device initialization time. > >There are no real time clock interrupts during the device initialization >phase of our kernel. The system time counter (lbolt in our case) does >not get incremented HZ times per second until after all devices >are initialized. So, > > How do you determine how much time has expired > when you have no real time clock interrupt? > Well, if you have a clock board in the system that you can use to count down times you can load the desired time into the clock board and then loop on its done bit. This assumes that the board has a done bit of course. I have used this for DEC's KWV11-C and I am sure that similar boards are available for other buses. The nice thing about this method is that you need only one clock board, since you can use the board under interrupt control later. Rich Neitzel "Any job not worth doing is not worth doing well." "Make people think they think and they will love you; make them think and they will hate you."