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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,cae92f92d6a1d4b1 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!feeder.news-service.com!85.214.198.2.MISMATCH!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: BrianG Newsgroups: comp.lang.ada Subject: Re: Ada.Execution_Time Date: Tue, 14 Dec 2010 19:16:20 -0500 Organization: A noiseless patient Spider Message-ID: References: <4d05e737$0$6980$9b4e6d93@newsspool4.arcor-online.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Wed, 15 Dec 2010 00:16:24 +0000 (UTC) Injection-Info: mx03.eternal-september.org; posting-host="BssHc7ONlcOOcC5Vapr56Q"; logging-data="12952"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18+kqv5M1z1/h79/UCDPZyM" User-Agent: Thunderbird 2.0.0.24 (X11/20100623) In-Reply-To: <4d05e737$0$6980$9b4e6d93@newsspool4.arcor-online.net> Cancel-Lock: sha1:epjPGAF5AWsd5IcncOlS7CLJfCc= Xref: g2news2.google.com comp.lang.ada:16916 Date: 2010-12-14T19:16:20-05:00 List-Id: Georg Bauhaus wrote: > On 12/12/10 10:59 PM, BrianG wrote: > > >> But my question still remains: What's the intended use of >> Ada.Execution_Time? Is there an intended use where its content >> (CPU_Time, Seconds_Count and Time_Span, "+", "<", etc.) is useful? > > I think that your original posting mentions a use that is quite > consistent with what the rationale says: each task has its own time. > Points in time objects can be split into values suitable for > arithmetic, using Time_Span objects. Then, from the result of > arithmetic, produce an object suitable for print, as desired. > > > While this seems like having to write a bit much, > it makes things explicit, like Ada forces one to be > in many cases. That' how I explain the series of > steps to myself. > > Isn't it just like "null;" being required to express > the null statement? It seems to me to be a logical > consequence of requiring that intents must be stated > explicitly. > I have no problem with verbosity or explicitness, and that's not what I was asking about. My problem is that what is provided in the package in question does not provide any "values suitable for arithmetic" or provide "an object suitable for print" (unless all you care about is the number of whole seconds with no information about the (required) fraction, which seems rather limiting). Time_Span is a private type, defined in another package. If all I want is CPU_Time (in some form), why do I need Ada.Real_Time? Also, why are "+" and "-" provided as they are defined? (And why Time_Span? I thought that was the difference between two times, not the fractional part of time.) Given the rest of this thread, I would guess my answer is "No, no one actually uses Ada.Execution_Time". --BrianG