Re: Real Time IO routines
- From: Adam Beneschan <adam@xxxxxxxxxx>
- Date: Fri, 26 Oct 2007 15:34:24 -0700
On Oct 26, 2:14 pm, andrew <andrew.carr...@xxxxxxxxxxx> wrote:
Something seems to be wrong though. In my program I am basiclly
doing:
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?
The RM says that "Time" is supposed to be able to represent a value,
from program start, of at least 50 years. So if a 10-second program
is overflowing that time, you've got a problem.
I tried a program similar to the above on two different compilers,
with "delay 10.0" in the place where you have "I run my algorithm
here"; and in both cases the output is around 10.0. I don't know why
you'd be seeing zero, assuming the system you're on has a working
clock. What type of machine are you running on, and what compiler?
-- Adam
.
- 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
- Real Time IO routines
- Prev by Date: Re: Real Time IO routines
- Next by Date: Re: Design - cyclic dependencies
- Previous by thread: Re: Real Time IO routines
- Next by thread: Re: Real Time IO routines
- Index(es):
Relevant Pages
|