From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,1faa282f2bd20fd4 X-Google-Attributes: gidfee84,public From: Rob Kirkbride Subject: Re: Real time clock (rpcc) Date: 1997/06/27 Message-ID: #1/1 X-Deja-AN: 253027536 Distribution: world X-NNTP-Posting-Host: rk-comp.demon.co.uk [194.222.52.8] References: <5ose30$iu5@usenet.pa.dec.com> Organization: Bedrock Corp. Reply-To: Rob Kirkbride Newsgroups: comp.unix.osf.osf1 >If you can tolerate a few microseconds of overhead, and if you are >running Digital UNIX V4.0 or later, you can configure the kernel >to provide microsecond resolution from the gettimeofday() system >call. > >The kernel does this by using the RPCC instruction to interpolate >between the 1024 Hz clock interrupts. As you observe, this can >be tricky on a multiprocessor. However, my understanding is that >the kernel code solves this problem, using a fairly subtle algorithm >to make sure that the interpolation is done correctly. It might >be very hard (or even impossible) to do this efficiently inside >user-level code. > >For more details, see > http://www.supelec.fr/decus/faq/faq-Digital-UNIX.html#P9 > >-Jeff Thanks for your help, I have decided to use timers instead. I feel these should be more accurate than me trying to work out how late I am or whatever. I suspect there implementation is better than I could manage as well. I do have a question regarding these however. See my new thread on signals. Rob -- Rob Kirkbride rob@rk-comp.demon.co.uk