From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10beba,f9f6cfa32b6331bb,start X-Google-Attributes: gid10beba,public X-Google-Thread: 102b08,6266f9f777efcf2d X-Google-Attributes: gid102b08,public X-Google-Thread: 114b0c,6266f9f777efcf2d X-Google-Attributes: gid114b0c,public X-Google-Thread: 1164f8,6266f9f777efcf2d X-Google-Attributes: gid1164f8,public X-Google-Thread: f4871,6266f9f777efcf2d X-Google-Attributes: gidf4871,public X-Google-ArrivalTime: 1994-01-29 20:17:56 PST Xref: gmd.de comp.sys.sun.apps:6852 comp.sys.hp:28894 comp.parallel.pvm:1349 comp.sys.dec:13124 Path: gmd.de!xlink.net!howland.reston.ans.net!vixen.cso.uiuc.edu!uwm.edu!psuvax1!news.cc.swarthmore.edu!netnews.upenn.edu!dsinc!pitt.edu!cortex.lrdc.pitt.edu!hahn From: hahn@cortex.lrdc.pitt.edu (mark hahn) Newsgroups: comp.sys.sun.apps,comp.sys.hp,comp.parallel.pvm,comp.sys.dec Subject: Re: Accessing Real Time Clock in workstations (HPs, Suns, Dec Alphas) Message-ID: <13286@blue.cis.pitt.edu> Date: 29 Jan 94 05:07:44 GMT References: <2hmq76INNd2e@flop.ENGR.ORST.EDU> Sender: news+@pitt.edu Followup-To: comp.sys.sun.apps,comp.sys.hp,comp.parallel.pvm,comp.sys.dec X-Newsreader: TIN [version 1.2 PL2] Bart Smaalders (barts@cyber.Eng.Sun.COM) wrote: | On SS10 M51 running the next release of Solaris: | min = .000002, mean = .000003 | On HP 9000/755 running HP-UX A.09.01 C: | min = .000017, mean = .000021 using the appended program, I measured: our hp735 running hpux A.09.01 A min is 9, average is 10.760459. (for scale, getpid takes ~.6 uS here.) out alpha 3400 running osf1 V1.3 111: min is 0, average is 13.289884. (in fact, ignoring preemptions, the delta was either 0, 976 or 977!) on a sun ss10/51, running 4.1.3: min is 12, average is 16.132984. on a sun 4/600 (4x cy 605's) running 4.1.2: min is 27, average is 82.008936. on some kinda r4k MP box from sgi, running irix 5.1.1: min is 12, average is 13.010583. on a gateway 486dx2/66 running Linux 0.99.14w: min is 12, average is 13.389410. regards, mark hahn. #include #include #include #define COUNT 1000000 int main() { unsigned min = UINT_MAX; unsigned sum = 0; unsigned i; static struct timeval tvs[COUNT]; for (i = 0; i < COUNT; i++) { gettimeofday(&tvs[i],0); } for (i = 1; i < COUNT; i++) { unsigned delta = (((tvs[i].tv_sec - tvs[i-1].tv_sec) * 1000000) + (tvs[i].tv_usec - tvs[i-1].tv_usec)); if (delta < min) min = delta; sum += delta; } printf("min is %u, average is %f.\n", min, (float)sum/COUNT); return 0; } -- this space intentionally left non-blank. hahn@neurocog.lrdc.pitt.edu