comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: An Example for Ada.Execution_Time
Date: Fri, 31 Dec 2010 13:05:06 +0000
Date: 2010-12-31T13:05:06+00:00	[thread overview]
Message-ID: <m2d3oi6qkd.fsf@pushface.org> (raw)
In-Reply-To: 1fb06tjt2dy1y$.1tkafcv9oya2w.dlg@40tude.net

"Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> writes:

> On Thu, 30 Dec 2010 18:51:30 -0500, BrianG wrote:
>
>> Since D.16 defines CPU_Time as if it were a numeric value, is it too 
>> much to ask why a conversion to some form of numeric value wasn't 
>> provided?
>
> But time is not a number and was not defined as if it were. It is the time
> differences which are numeric. RM D.14 defines differences of CPU_Time as
> Time_Span. Time_Span is numeric.

This is certainly true. However, I remain surprised that .. even delving
back to v1.2 of the AI .. the proposer found it necessary to have this
type CPU_Time. The concept being looked for is the number of seconds
during which *this* task was executing, still sounds like a Duration
(OK, Time_Span if you must) to me.

> I think this is the core of misunderstanding. The thing you have in
> mind is "time interval since the task start according to the execution
> time clock."  It is not Ada.Execution_Time.Clock, it is:
>
>    Ada.Execution_Time.Clock - CPU_Time_First

I don't _think_ that CPU_Time_First is actually defined as the value of
Clock when the task starts (is initialized, put on the ready queue,
whatever).

D14(13/2) says "For each task, the execution time value is set to zero
at the creation of the task."; however, zero is clearly not a value of
CPU_Time, so I don't know what is meant.

> There is a direct correspondence between two, yet they are
> conceptually different things.

I have no idea what's meant by CPU_Time, then! Seems to me it's a giant
bug waiting to happen. It's clear that the CPU_Time of one task is
incommensurate with the CPU_Time of another. Given that, what's it
_for_?


Of course, I competely understand that the Standard is what it is, and
no one's going to change it at this point.



  parent reply	other threads:[~2010-12-31 13:05 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-27 18:26 An Example for Ada.Execution_Time anon
2010-12-28  2:31 ` BrianG
2010-12-28 13:43   ` anon
2010-12-29  3:10   ` Randy Brukardt
2010-12-30 23:51     ` BrianG
2010-12-31  9:11       ` Dmitry A. Kazakov
2010-12-31 12:42         ` Niklas Holsti
2010-12-31 14:15           ` Dmitry A. Kazakov
2010-12-31 18:57             ` Niklas Holsti
2011-01-01 13:39               ` Dmitry A. Kazakov
2011-01-01 20:25                 ` Niklas Holsti
2011-01-03  8:50                   ` Dmitry A. Kazakov
2010-12-31 13:05         ` Simon Wright [this message]
2010-12-31 14:14           ` Dmitry A. Kazakov
2010-12-31 14:24           ` Robert A Duff
2010-12-31 22:40           ` Simon Wright
2011-01-01  0:07       ` Randy Brukardt
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox