Re: Real Time IO routines



On Oct 26, 2:14 pm, andrew <andrew.carr...@xxxxxxxxxxx> >
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?- Hide quoted text -


In that case use the conversion as shown bellow.

Put_Line (Duration'Image (To_Duration (finish - start)));

Check the Ada.Real_Time package specification you will see all
operators / operations used above.

AV


.



Relevant Pages

  • Re: SpaceTime & memory.
    ... Each atom is in its self is a tiny clock, ... I've thought about if the preception of time ... Artificial Intelligence program. ... Perhaps if such an algorithm could be discovered, ...
    (sci.physics.relativity)
  • Re: polling algorithm
    ... what can the third insane clock say that will make you think ... server claims its own accuracy is. ... > It is possible that a naive algorithm could be mislead. ... way to determine whether it is a falseticker. ...
    (comp.protocols.time.ntp)
  • Re: question on timing results
    ... clock() provides the ... >> call to an algorithm and the end would provide me with the CPU time ... > The bash commando 'time' gives real, user and system time of a command. ...
    (Fedora)
  • Re: 64 bit atomic reads on x86
    ... By explaining that it only works for a clock. ... You have to detect roll-over ... general-purpose algorithm. ... I think the true problem with his algorithm. ...
    (comp.programming.threads)
  • Re: A puzzle
    ... > I should rectify that. ... I can't agree that time is a clock, ... and velocity which are very real, and when we plow those those an algorithm, ...
    (sci.physics.relativity)