From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,61d8daec8bfa486e X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: An Example for Ada.Execution_Time Date: Fri, 31 Dec 2010 20:57:54 +0200 Organization: Tidorum Ltd Message-ID: <8o6ndjFm6sU1@mid.individual.net> References: <1fb06tjt2dy1y$.1tkafcv9oya2w.dlg@40tude.net> <8o61e2FkdvU1@mid.individual.net> <1jmysfv0ifrrj$.h84gfj1gv0ht.dlg@40tude.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net vY1/St+z2VOZZZndNqvNdAybsziUAb/uZuICruquMNqB0WulGZ Cancel-Lock: sha1:Wg5eG5zcF3KbpGmv29owlYxJk9w= User-Agent: Mozilla-Thunderbird 2.0.0.24 (X11/20100328) In-Reply-To: <1jmysfv0ifrrj$.h84gfj1gv0ht.dlg@40tude.net> Xref: g2news2.google.com comp.lang.ada:17258 Date: 2010-12-31T20:57:54+02:00 List-Id: Dmitry A. Kazakov wrote: > On Fri, 31 Dec 2010 14:42:41 +0200, Niklas Holsti wrote: > >> Dmitry A. Kazakov wrote: >>> 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. >> You keep saying that, Dmitri, but your only argument seems to be the >> absence of some operators like addition for CPU_Time. Since CPU_Time is >> private, we cannot tell if this absence means that the D.14 authors >> considered the type non-numeric, or just considered the operators >> unnecessary for the intended uses. > > No, the argument is that time is a state of some recurrent process, like > the position of an Earth's meridian relatively to the Sun. This state is > not numeric, it could be numeric though. That depends on the nature of the > process. This is your view of what the English word "time" means. It is not based on any text in the RM, as far as I can see. (And I don't see what "recurrent process" has to do with it. Time could also be measured by radioactive decay, for example, which is not recurrent. Or by water clocks, also not recurrent as long as the water lasts. Using recurrent processes like oscillators, rotators, or orbiters is just a good way to measure time accurately by counting periods.) I have also tried to understand D.14 by interpreting its English words, like "time", but Randy says that this is "reading stuff that is not there". I don't entirely agree with him. For CPU_Time I think that D.14 shows sufficiently clearly that it has a numeric meaning. >> - by RM D.14 (13/2), "the execution time value is set to zero at the >> creation of the task". > > I agree that here RM is sloppy. They should rather talk about an "epoch" > rather than "zero," if they introduced CPU_Time as a time. So, here the RM disagrees with your view that CPU_Time is not numeric, and your conclusion is that the RM is wrong? I am not convinced. > I suppose Time_Of (0) is the time when the task started because of D.14 > (13/2). Good point, I did not think of Time_Of (0) as a replacement for the (missing) CPU_Time_Zero constant. So, even if we don't agree on the numeric or non-numeric nature of CPU_Time, we do agree on how to use Ada.Execution_Time.Clock to compute the execution time. Good! -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .