From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,3feec7d54e23125e X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1994-07-18 02:00:12 PST Path: bga.com!news.sprintlink.net!news.onramp.net!convex!cs.utexas.edu!howland.reston.ans.net!EU.net!Germany.EU.net!news.dfn.de!news.uni-jena.de!idec02!sc From: sc@idec02inf.uni-jena.de (Sebastian Schmidt) Newsgroups: comp.unix.osf.osf1 Subject: Re: better real time clock resolution on Alpha? Date: 18 Jul 1994 08:27:24 GMT Organization: Friedrich-Schiller-University Jena, Germany Distribution: world Message-ID: <30dedc$l4k@hpux.rz.uni-jena.de> References: <30416i$5lo@rebold.regent.e-technik.tu-muenchen.de> NNTP-Posting-Host: idec02.inf.uni-jena.de In article <30416i$5lo@rebold.regent.e-technik.tu-muenchen.de>, pak@regent.e-technik.tu-muenchen.de (Peter A Krauss) writes: > > How do I obtain a better real time clock resolution > than 976 usec on a Alpha? > The highest resolution you get by using the process cycle counter (PCC), which runs with a fraction from N=1..16 of the CPU clock. For the 21064 N is 1. For more information see pg. (I) 4-118 of the Alpha Architecture Reference Manual. Here is a little example, I use to time short code sequences (using the extended asm features of GCC): register unsigned long start, stop; unsigned time; asm ("rpcc %0" : "=r" (start)); /* insert the instructions you want to time here */ asm ("rpcc %0" : "=r" (stop)); time= (stop&0xffffffff)-(start&0xffffffff); -- May your disk buffers flush before powerdown! Sebastian