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: 103376,61d8daec8bfa486e X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!feeder.news-service.com!newsfeed.straub-nv.de!nuzba.szn.dk!news.jacob-sparre.dk!pnx.dk!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: An Example for Ada.Execution_Time Date: Fri, 31 Dec 2010 18:07:18 -0600 Organization: Jacob Sparre Andersen Message-ID: References: NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1293840441 27835 69.95.181.76 (1 Jan 2011 00:07:21 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Sat, 1 Jan 2011 00:07:21 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5931 Xref: g2news2.google.com comp.lang.ada:17261 Date: 2010-12-31T18:07:18-06:00 List-Id: "BrianG" wrote in message news:ifj5u9$rr5$1@news.eternal-september.org... > Randy Brukardt wrote: >> "BrianG" wrote in message >> news:ifbi5c$rqt$1@news.eternal-september.org... >> ... >>> >Neither Execution_Time or Execution_Time.Timers provides any value >>> >that can be used directly. >> >> This seems like a totally silly question. Giving this some sort of >> religious importance is beyond silly... >> >> Randy. > > > Apparently, asking how a package, defined in the standard, was intended to > be used is now a silly question, and asking for an answer to the question > I originally asked (which was to clarify a previous response, not to > provide an example of use) is a religious debate. I need to revise my > definitions. But you didn't ask how a package defined in the standard was intended to be used. You asked why you have to use another package (Ada.Real_Time) in order for it to be useful. And you've repeated that over and over and over like it was meaningful in some way. But that is pretty much the definition of a silly question. It's just the way the package was defined, and it doesn't matter beyond having to add one additional "with" clause. And that's pretty much irrelevant. In real Ada programs, there are many with clauses in the average compilation unit. In Janus/Ada, the number of withs averages 20 or so, and Claw programs are much higher than that. One could reduce those numbers by putting everything into a few massive packages, but those would be unweldy, poorly encapuslated, and close to unmaintainable. The need to add one extra with to use a real-time package just falls into the noise. Probably it would have been better to offer the option of retrieving a value in terms of Duration, but it is just not a significant difference. The answer to the "how do you use" question is simple and has been provided many times: use "-" to get a Time_Span, operate on that, and why that would be a problem to you or anyone else is beyond my comprehension. > I won't claim to be an expert on the RM, but I don't recall any other > package (I did look at the ones you mention) that define a private type > but don't provide operations that make that type useful (for some > definition of 'use'). Ada.Directories doesn't require Ada.IO_Exceptions > to use Directory_Entry_Type or Search_Type; Ada.Streams.Stream_IO doesn't > require Ada.Streams (or Ada.Text_IO) to Create/Open/Read/etc. a File_Type. > The only thing provided from a CPU_Time is a count in seconds, or another > private type. Here I completely disagree. If you plan to do anything *practical* with the Ada.Directories types, you'll have to use another package (at least Ada.Text_IO) to do something with the results. (Indeed, that is true of *all* Ada packages -- you have to do I/O somewhere or the results are irrelevant. And you are wrong about Stream_IO.Read; you have to use a Stream_Element_Array in order to do that, and that is in Ada.Streams, not in Stream_IO. In any case, I'm done wasting my time answering this question. It's obvious that you have lost you mind vis-a-vis this question, and there is no reason to waste any more time if/until you get it back. Do not feed the troll (even if the troll is someone that is otherwise reasonable). Randy.