comp.lang.ada
 help / color / mirror / Atom feed
From: jzamora@avellano.datsi.fi.upm.es (Juan Zamorano Flores)
Subject: Re: Timing Ada programs using the DEC UNIX microtimer kernel option
Date: 1998/04/27
Date: 1998-04-27T00:00:00+00:00	[thread overview]
Message-ID: <6i27ap$m85$1@panoramix.fi.upm.es> (raw)
In-Reply-To: 6hsab5$rh1$1@eplet.mira.net.au


In article <6hsab5$rh1$1@eplet.mira.net.au>, dccoote@werple.mira.net.au (David Coote) writes:
|> 
|> "As for micro-timer resolution - the clock resolution remains the same - 
|> 1/1024; however, any call to clock_gettime(3) is guaranteed to be 
|> monotonically increasing with a granularity of 1 microsecond. (i.e. the clock 
|> is still ticking at 1/1024, but clock_gettime(3) calls return values that are 
|> unique and APPEAR [DEC's emphasis] to have 1 microsecond resolution. This is 
|> useful for critical timestamping.)"
|> 
|> Well, how do they do this monotonic increase? If the appropriate parts of the 
|> kernel are getting tickled every 1024Hz, how is the kernel returning finer 
|> resolution between ticks?
|> 
|> Anyone know anything about this?
|> 
|> David
|> 

     The hardware timer interrupts at 1024Hz. So the kernel has a time granularity
of 1/1024Hz. The clock_gettime call could use the hardware timer downcount
register to improve the resolution.

     I don't know DEC UNIX but in DOS the hardware timer interrupts at 18.2 Hz.
But you can have microseconds resolution if you read the hardware timer downcount
register.

      Juan




  parent reply	other threads:[~1998-04-27  0:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-04-25  0:00 Timing Ada programs using the DEC UNIX microtimer kernel option David Coote
1998-04-25  0:00 ` Joe Gwinn
1998-04-26  0:00   ` Jonathan Stone
1998-04-26  0:00     ` David Coote
1998-04-28  0:00     ` Jeffrey Mogul
1998-04-27  0:00 ` Juan Zamorano Flores [this message]
1998-05-01  0:00   ` Short DOSish note (was Re: Timing Ada programs using the DEC UNIX microtimer kernel option) John M. Mills
1998-05-01  0:00     ` Jerry van Dijk
replies disabled

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