* Help performing timings
@ 1995-04-06 0:00 Simon Ibberson
1995-04-07 0:00 ` Theodore Dennison
1995-04-07 0:00 ` Robert Dewar
0 siblings, 2 replies; 3+ messages in thread
From: Simon Ibberson @ 1995-04-06 0:00 UTC (permalink / raw)
I am new to both Ada (4 weeks experience) and this newsgroup.
I need some help/information on how to perform some timings of Ada
procedure calls, what I want to do is:
Read the current time
Make a procedure call
Read the current time
Calculate the elapsed time
I require very accurate timings, in the order of micro-seconds.
Are there standard libraries for doing this?
Any help greatly appreciated, and replies by email if possible please
due to the current problems Demon are having with the news service.
--
Simon Ibberson
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Help performing timings
1995-04-06 0:00 Help performing timings Simon Ibberson
1995-04-07 0:00 ` Theodore Dennison
@ 1995-04-07 0:00 ` Robert Dewar
1 sibling, 0 replies; 3+ messages in thread
From: Robert Dewar @ 1995-04-07 0:00 UTC (permalink / raw)
the best way to deal with this timing issue is to interface to appropriate
C routines in your library. There are no portable routines with this kind
of accuracy -- the closest you can come is to use the real time package
in the annex, but I think the easiest thing is just to interface directly
to the C routine, which is particularly easy in GNAT, since the standard
GNAT types correspond to the C types (e.g. int = Integer). Or, if you want
to be more "correct", use Interfaces.C types.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Help performing timings
1995-04-06 0:00 Help performing timings Simon Ibberson
@ 1995-04-07 0:00 ` Theodore Dennison
1995-04-07 0:00 ` Robert Dewar
1 sibling, 0 replies; 3+ messages in thread
From: Theodore Dennison @ 1995-04-07 0:00 UTC (permalink / raw)
si@lynx1.demon.co.uk (Simon Ibberson) wrote:
>I am new to both Ada (4 weeks experience) and this newsgroup.
>
>I need some help/information on how to perform some timings of Ada
>procedure calls, what I want to do is:
>
> Read the current time
> Make a procedure call
> Read the current time
> Calculate the elapsed time
>
>I require very accurate timings, in the order of micro-seconds.
>Are there standard libraries for doing this?
I will assume you mean Ada 83...
No. You will have to make system calls. The correct calls depand upon
what platform/OS/compiler you have.
However, it sounds to me like what you want is a performance analyzer.
Most good development systems come with one. They work much like a
debugger, but merely log information and continue, rather than stopping
at their "trace points". Check you vendor/O.S. documentation to see
if you have one. Most come set up to automaticly collect data on the
amount of time spent in each routine/program block.
T.E.D. (strucutred programming mafioso)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1995-04-07 0:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1995-04-06 0:00 Help performing timings Simon Ibberson
1995-04-07 0:00 ` Theodore Dennison
1995-04-07 0:00 ` Robert Dewar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox