comp.lang.ada
 help / color / mirror / Atom feed
From: "Vladimir Olensky" <vladimir_olensky@yahoo.com>
Subject: Re: Apex vs GNAT on solaris
Date: 1999/12/10
Date: 1999-12-10T00:00:00+00:00	[thread overview]
Message-ID: <s50ebmql53184@corp.supernews.com> (raw)
In-Reply-To: s4vt4untfkb156@corp.supernews.com


Vladimir Olensky wrote in message ...
>Geoff Bull wrote in message <384F9FAE.8FEFEB30@acenet.com.au>...


>>Vladimir Olensky wrote:
>>>
>>> GNAT 3.12p Ada.Real_Time.Clock  gives one
>>> nanosecond resolution on Windows NT
>>
>>Now that's clever, on a system with a 3ns (or whatever) clock!
>>:-)
>
>Yes, you are right here about system clock.
>From here a can make a guess that you are using 300 MHz machine.
>On 300MHz machine clock cycle is about 3 ns
>On 700MHz machine clock cycle is about 1.4 ns
>
>Finest possible resolution for GNAT is 1ns.
>(See GNAT ref.manual and implementation)
>
>In reality GNAT resolution depends on hardware
>high-resolution performance counter as
>Ada.Real_Time.Clock calls QueryPerformanceCounter
>from kernel32.
<..>
>So all depends on hardware implementation.


e.g:

Pentium-III instruction RDTSC (Read Time-Stamp Counter):

This instruction loads the current value of the processor's
time-stamp counter into the EDX:EAX registers.
<..>
The processor increments the time-stamp counter
MSR every clock cycle and resets it to 0 whenever
the processor is reset.
------------------------------------
So on 700MHz  PIII machine resolution could be up to 1.4 ns.
Anyone can use this instruction directly to obtain the best
possible time resolution and not to wait when Performance
Counter will be updated in the next tick with the data from
this TSC.


Regards,
Vladimir Olensky







  reply	other threads:[~1999-12-10  0:00 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-12-07  0:00 Apex vs GNAT on solaris reason67
1999-12-07  0:00 ` reason67
1999-12-07  0:00 ` reason67
1999-12-07  0:00 ` Robert Dewar
1999-12-07  0:00   ` Roger Racine
1999-12-07  0:00     ` Jean-Pierre Rosen
1999-12-07  0:00     ` David Starner
1999-12-08  0:00       ` Robert Dewar
1999-12-07  0:00     ` Samuel T. Harris
1999-12-07  0:00     ` Larry Kilgallen
1999-12-08  0:00     ` Robert Dewar
1999-12-08  0:00       ` Robert A Duff
1999-12-08  0:00       ` Roger Racine
1999-12-08  0:00         ` Larry Kilgallen
1999-12-08  0:00           ` Roger Racine
1999-12-08  0:00             ` tmoran
1999-12-08  0:00             ` Larry Kilgallen
1999-12-09  0:00         ` Robert Dewar
1999-12-09  0:00           ` Roger Racine
1999-12-09  0:00             ` Mike Silva
1999-12-10  0:00               ` Robert Dewar
1999-12-09  0:00             ` Larry Kilgallen
1999-12-10  0:00               ` Robert Dewar
1999-12-16  0:00             ` Stefan Skoglund
1999-12-08  0:00     ` Ted Dennison
1999-12-07  0:00   ` reason67
1999-12-08  0:00     ` Robert Dewar
1999-12-08  0:00       ` reason67
1999-12-08  0:00         ` Robert Dewar
1999-12-08  0:00         ` Larry Kilgallen
1999-12-08  0:00         ` Robert A Duff
1999-12-07  0:00 ` reason67
1999-12-07  0:00 ` reason67
1999-12-07  0:00 ` reason67
1999-12-07  0:00   ` Robert Dewar
1999-12-07  0:00     ` reason67
1999-12-07  0:00 ` reason67
1999-12-07  0:00   ` Robert Dewar
1999-12-07  0:00     ` reason67
1999-12-08  0:00       ` Robert Dewar
1999-12-08  0:00         ` reason67
1999-12-07  0:00     ` Vladimir Olensky
1999-12-07  0:00       ` Vladimir Olensky
1999-12-09  0:00       ` Geoff Bull
1999-12-09  0:00         ` Vladimir Olensky
1999-12-10  0:00           ` Vladimir Olensky [this message]
1999-12-09  0:00         ` Vladimir Olensky
1999-12-07  0:00 ` reason67
replies disabled

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