From: tmoran@bix.com (Tom Moran)
Subject: Re: Timing things.
Date: 1999/06/16
Date: 1999-06-16T00:00:00+00:00 [thread overview]
Message-ID: <3767f26f.840466@news.pacbell.net> (raw)
In-Reply-To: 3767E18A.1904F5AF@acm.org
>Windows98 PC using Gnat 3.11p
>...
>I am getting either end_time and start_time are the same or
>num_micros is 110_000
Sounds like it's using the standard PC clock that tickes every 55
milliseconds. You can get a different compiler, or a different OS or
machine, or make a direct OS call to QueryPerformanceCounter (sp?)
or
> start_time := ada.real_time.clock;
for trial in 1 .. 100 loop
>do operations ( e.g. build 10_000 element heap in at least 23_000
> comparisons)
end loop;
>end_time := ada.real_time.clock;
>num_micros := ada.real_time."/"(ada.real_time."-"(end_time,start_time),
ada.real_time.microseconds(1))/100; ie, run the test long enough to
get multiple clock ticks, then divide the elapsed time by the number
of trials you used.
next prev parent reply other threads:[~1999-06-16 0:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-06-16 0:00 Timing things Joel VanLaven
1999-06-16 0:00 ` Tom Moran [this message]
1999-06-16 0:00 ` Joel VanLaven
1999-06-17 0:00 ` Pascal Obry
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox