From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,1faa282f2bd20fd4,start X-Google-Attributes: gidfee84,public From: Rob Kirkbride Subject: Real time clock (rpcc) Date: 1997/06/25 Message-ID: #1/1 X-Deja-AN: 252510842 Distribution: world X-NNTP-Posting-Host: rk-comp.demon.co.uk [194.222.52.8] Organization: Bedrock Corp. Reply-To: Rob Kirkbride Newsgroups: comp.unix.osf.osf1 I am trying to use rpcc to give me accurate times in order that I can trigger a timer every 50ms. This generates a SIGALRM and then I use the rpcc instruction to find whether I have am late servicing the timer and if so by how much. As I understand the top 32 bits of the register is decremented when the program is NOT running on the cpu. The bottom 32 bits are incremented I thought by a piece of hardware all the time. The problem is that as the processor becomes loaded the bottom 32 bits slow down. This would seem to be impossible unless the operating system is maintaining this counter. Does anyone know more about the rpcc instruction? Also my code is not safe in a multi-processor system which I would like it to be. Should I be using an alternative method for generating regular alarms preferably by something that doesn't slow down if the system becomes loaded! Any help would be much appreciated, Rob -- Rob Kirkbride