Re: Real Time IO routines
- From: andrew <andrew.carroll@xxxxxxxxxxx>
- Date: Sat, 27 Oct 2007 13:12:22 -0700
On Oct 27, 7:40 am, John McCormick <mccorm...@xxxxxxxxxx> wrote:
On Oct 26, 4:14 pm, andrew <andrew.carr...@xxxxxxxxxxx> wrote:
start := clock;
--I run my algorithm here
finish := clock;
ada.Text_IO.put_line("time = " & duration'image(to_duration(finish -
start)));
the output is always time = 0.000000000. I know it had to take some
time because it takes about 10 seconds for the program to reach that
point in the code. Overflow maybe?
For years I used the identical logic in an exercise in plotting
running times for various sorting algortihms in a unit on Big-O. It
worked fine for the old GNAT (Ada 95). Last year when I recompiled it
with GNAT GPL, I got the same results as you - all times gave zero.
When I added a delay 10.0, it worked as Adam reported. I meant to
submit a bug report, but never got around to writing it up. I haven't
tried it with the latest GPL version.
John
Ahhh haaa, that's it. I put a delay 1.0 before I run my algorithm and
before I do start := clock and now it gives me a value. ;-)
Dare I say something is not quite right?
.
- References:
- Real Time IO routines
- From: andrew
- Re: Real Time IO routines
- From: Anh Vo
- Re: Real Time IO routines
- From: andrew
- Re: Real Time IO routines
- From: Anh Vo
- Re: Real Time IO routines
- From: andrew
- Re: Real Time IO routines
- From: Ludovic Brenta
- Re: Real Time IO routines
- From: andrew
- Re: Real Time IO routines
- From: Dmitry A. Kazakov
- Re: Real Time IO routines
- From: andrew
- Re: Real Time IO routines
- From: John McCormick
- Real Time IO routines
- Prev by Date: Re: Real Time IO routines
- Next by Date: Re: Real Time IO routines
- Previous by thread: Re: Real Time IO routines
- Next by thread: Re: Real Time IO routines
- Index(es):
Relevant Pages
|