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.6 required=5.0 tests=BAYES_00,TO_NO_BRKTS_FROM_MSSP autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,88aaef9110656b58 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-12 07:37:20 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.edu!nntpserver.com!hub1.nntpserver.com!news-out.spamkiller.net!propagator-la!news-in-la.newsfeeds.com!news-in.superfeed.net!newsranger.com!www.newsranger.com!not-for-mail Newsgroups: comp.lang.ada From: Ted Dennison References: <17cd177c.0110120321.3077bccf@posting.google.com> Subject: Re: CPU time for Win32 & GNAT Message-ID: <7eDx7.26122$ev2.34594@www.newsranger.com> X-Abuse-Info: When contacting newsranger.com regarding abuse please X-Abuse-Info: forward the entire news article including headers or X-Abuse-Info: else we will not be able to process your request X-Complaints-To: abuse@newsranger.com NNTP-Posting-Date: Fri, 12 Oct 2001 10:36:51 EDT Organization: http://www.newsranger.com Date: Fri, 12 Oct 2001 14:36:51 GMT Xref: archiver1.google.com comp.lang.ada:14413 Date: 2001-10-12T14:36:51+00:00 List-Id: In article <17cd177c.0110120321.3077bccf@posting.google.com>, Gautier says... >Does someone know how to obtain the CPU time (or a CPU >duration...) for Win32 (under GNAT) in a simple way ? >The program doesn't use tasking and no more resolution >than the one of Duration is needed for time spans. >I'm sure someone has a ready-made function in his/her toolbox... There's probably some neat little trick out there (have you tried using bash?). I believe the programatic way to do it depends on your OS. For NT-based OS's, you can gather "performance information" from the registry. That is how the NT task manager and perfmon gather their information. For Win9x OS's, you have to do it in a completely different way (which doesn't work on NT). The current version of the SETI@Home Service uses the NT performance information to check to see if certian executables are running (so that it can stop SETI processing). If you download the source distribution, you can look at how it is done. There's also an NT performance information helper package in there you can use under the GPL, but its in a primitive state right now. --- T.E.D. homepage - http://www.telepath.com/dennison/Ted/TED.html No trees were killed in the sending of this message. However a large number of electrons were terribly inconvenienced.