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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,6bf1c4b845bd2160 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news2.google.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nntp.club.cc.cmu.edu!feeder.erje.net!nuzba.szn.dk!pnx.dk!fu-berlin.de!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: What about a glob standard method in Ada.Command_Line ? Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <4c6f9837$0$5420$ba4acef3@reader.news.orange.fr> Date: Sun, 22 Aug 2010 21:46:30 +0200 Message-ID: NNTP-Posting-Date: 22 Aug 2010 21:46:28 CEST NNTP-Posting-Host: 01e7436c.newsspool3.arcor-online.net X-Trace: DXC=EkJBNH0lBB=i6K;>iZ]763McF=Q^Z^V384Fo<]lROoR18kF[ On Sun, 22 Aug 2010 21:30:35 +0200, Yannick Duch�ne (Hibou57) wrote: > Le Sat, 21 Aug 2010 11:11:39 +0200, Pascal Obry a �crit: >> I see the argument but there is already some APIs that cannot be >> implemented in some OS (like Ada.Execution_Time.Timers on Win32 for >> example). > Will have to check about what Ada.Execution_Time.Timers is exactly, > because I know there is a timer provided in the Windows API, and for long. Under Windows there is no way to reliable determine the time a thread owned CPU. Using existing APIs you can count quants, not the time. The problem is that when the thread releases processor before it consumed the whole quant, e.g. by entering non-busy waiting, the pending quant is not counted. Theoretically you could have 99% CPU usage with 0% indicated in the task manager. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de