Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: hahn@cortex.lrdc.pitt.edu (mark hahn)
Subject: Re: Accessing Real Time Clock in workstations (HPs, Suns, Dec Alphas)
Date: 29 Jan 94 05:07:44 GMT	[thread overview]
Message-ID: <13286@blue.cis.pitt.edu> (raw)
In-Reply-To: mk9krlINNna0@appserv.Eng.Sun.COM

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 <stdio.h>
#include <sys/time.h>
#include <limits.h>

#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


  parent reply	other threads:[~1994-01-29  5:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-01-20 20:40 Accessing Real Time Clock in workstations (HPs, Suns, Dec Alphas) NeoSwami
1994-01-20 21:42 ` Paul Gootherts
1994-01-21 12:23   ` Kell S|nnichsen
1994-01-21 15:48   ` john.j.rushford..jr
1994-01-21 19:25     ` Guy Harris
1994-01-24 17:12   ` Benjamin Z. Goldsteen
1994-01-25  8:08     ` Bart Smaalders
1994-01-25 18:42       ` Bob Manchek
1994-01-26  0:57       ` Doug Siebert
1994-01-26  8:11         ` Casper H.S. Dik
1994-01-27  4:07         ` Greg Limes
1994-01-29  5:07       ` mark hahn [this message]
1994-01-21 16:59 ` Bart Smaalders
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox