From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,94c57d6f42aba90b,start X-Google-Attributes: gid1164f8,public From: arnold@zam331.kfa-juelich.de (A.Arnold) Subject: How to find out clock frequency under DU ? Date: 1997/03/17 Message-ID: <5gj3cd$idk@zam201.zam.kfa-juelich.de>#1/1 X-Deja-AN: 226138830 Distribution: world Sender: arnold@zam331 (A.Arnold) Organization: Forschungszentrum Juelich GmbH Reply-To: a.arnold@kfa-juelich.de Newsgroups: comp.sys.dec On an AlphaStation running Digital Unix, is there a way for a C program to find out the processor's clock speed? I am using the processor's cycle counter to get a high-resolution, low-overhead timer, and I want to make my code machine- independent (i.e. the scaling factor should adapt to the processor's clock). I tried delaying for a known time with usleep() a measuring the difference in clocks, but that doesn't seem to be very accurate... -- -------------------------------------------------------------------------------- Alfred Arnold Phone: +49 (2461) 61-2434 Zentralinstitut fuer Angewandte Mathematik Fax : +49 (2461) 61-6656 Forschungszentrum Juelich E-Mail: a.arnold@kfa-juelich.de D-52425 Juelich, Germany --------------------------------------------------------------------------------