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,cae92f92d6a1d4b1 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!news.glorb.com!news2.glorb.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: Ada.Execution_Time Date: Fri, 17 Dec 2010 10:49:26 +0200 Organization: Tidorum Ltd Message-ID: <8n0mgnFv2sU1@mid.individual.net> References: <4d05e737$0$6980$9b4e6d93@newsspool4.arcor-online.net> <1wmsukf0wglz3$.odnzonrpayly.dlg@40tude.net> <6n1c5myuf2uz$.10jl3ln7il3aq.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 2Bdtm5vzazndD8RYVAuK9g9X8xLa1U/Daffu9t/GgS4mm93XAe Cancel-Lock: sha1:sJIGoLFmxiHOxpuTalX01kV+2Yc= User-Agent: Mozilla-Thunderbird 2.0.0.24 (X11/20100328) In-Reply-To: <6n1c5myuf2uz$.10jl3ln7il3aq.dlg@40tude.net> Xref: g2news2.google.com comp.lang.ada:16975 Date: 2010-12-17T10:49:26+02:00 List-Id: >>> On Wed, 15 Dec 2010 16:05:16 -0600, Randy Brukardt wrote: >>> >>>> I think you are missing the point of CPU_Time. It is an abstract >>>> representation of some underlying counter. There is no requirement that this >>>> counter have any particular value -- in particular it is not necessarily >>>> zero when a task is created. Are you sure, Randy? RM D.14 13/2 says "For each task, the execution time value is set to zero at the creation of the task." >>>> So the only operations that are meaningful on a >>>> value of type CPU_Time are comparisons and differences. Arguably, CPU_Time >>>> is misnamed, because it is *not* some sort of time type. Additions of CPU_Time values should also be meaningful. As I understand it, Ada.Execution_Time is meant for use in task scheduling, where it is essential that when several tasks start at the same time on one processor, the sum of their CPU_Time values at any later instant is close to the real elapsed time, Ada.Real_Time.Time_Span. Assuming that CPU_Time starts at zero for each task, see above. Dmitry A. Kazakov wrote: > CPU_Time has no physical meaning. 2s might be 2.5s > real time or 1 year real time. CPU_Time values have physical meaning after being summed over all tasks. The sum should be the real time, as closely as possible. -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .