Re: Real Time IO routines



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?

.



Relevant Pages

  • Start
    ... Start Pinnball Wisard without delay. ... We have fully populated our closed system Planet Earth and have made ... The odessa multidisciplinary embeded within humanity and its ... infrastructur algorithm it ...
    (soc.history.medieval)
  • Re: (Oz vs Delphi), Part 2, Pascals Triangle.
    ... >> After that an integer overflow occurs. ... > The algorithm is sound, regardless of how precise you can get. ... > without recursion and without lots of list operations. ... >> So the funny thing is Delphi bites you in the ass sooner than it bites ...
    (alt.comp.lang.borland-delphi)
  • Re: Taylor approximation of unknown function
    ... If you center the window on the current time point(if exactly real time) then the filter cannot be real time. ... It requires you introduce a delay so that you can get enough data points. ... Could you please explain the meaning of non-causality in an algorithm? ...
    (sci.math)
  • Re: int/long unification hides bugs
    ... > The algorithm uses the fundamental theorem of arithmetic ... > every atom in the molecule, ... > In very rare cases this can overflow 32 bits. ... > Because Python now no longer gives this overflow error, ...
    (comp.lang.python)
  • Start To all data out safe mode as defined 1977 2008 ww3>(parked usa)< 1977 2008 ww3 all data
    ... trough the use of this algorithm and as well stagnation achivment). ... Everybody in the past who has fought against (odessa by odessa rules ... is forbiden to be stoped and is unstopable no delay. ...
    (soc.culture.romanian)