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!news1.google.com!goblin3!goblin1!goblin.stu.neva.ru!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: An Example for Ada.Execution_Time Date: Fri, 31 Dec 2010 22:40:32 +0000 Organization: A noiseless patient Spider Message-ID: References: <1fb06tjt2dy1y$.1tkafcv9oya2w.dlg@40tude.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx03.eternal-september.org; posting-host="dFCm8HWntFqmDIilBLqEJQ"; logging-data="25797"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+OsjH0zwVht8yYQHb6YtD8zkJzkv36gts=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (darwin) Cancel-Lock: sha1:ulchf9DDFJpdiNhEyqYiisnx93k= sha1:JtU2vHxZX/GXqWvwQqhFLrzm/Hg= Xref: g2news2.google.com comp.lang.ada:17259 Date: 2010-12-31T22:40:32+00:00 List-Id: Simon Wright writes: > "Dmitry A. Kazakov" writes: >> 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). I think (from having had a look at GNAT GPL 2010's sources) that you are right to suggest Time_Of (0) in place of CPU_Time_First (in GNAT's implementation, the latter is Duration'First!). Or Niklas's suggestion of the missing CPU_Time_Zero.