comp.lang.ada
 help / color / mirror / Atom feed
From: Ted Dennison<dennison@telepath.com>
Subject: Re: CPU time for Win32 & GNAT
Date: Fri, 12 Oct 2001 14:36:51 GMT
Date: 2001-10-12T14:36:51+00:00	[thread overview]
Message-ID: <7eDx7.26122$ev2.34594@www.newsranger.com> (raw)
In-Reply-To: 17cd177c.0110120321.3077bccf@posting.google.com

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.



  parent reply	other threads:[~2001-10-12 14:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-12 11:21 CPU time for Win32 & GNAT Gautier
2001-10-12 13:50 ` Pat Rogers
2001-10-12 14:43   ` Ted Dennison
2001-10-12 14:48     ` Pat Rogers
2001-10-12 17:17       ` Ted Dennison
2001-10-12 14:36 ` Ted Dennison [this message]
2001-10-12 18:30   ` Sune Falck
  -- strict thread matches above, loose matches on Subject: below --
2001-10-14 19:54 Gautier Write-only-address
2001-10-15 14:33 ` Ted Dennison
2001-10-15  9:47 Gautier Write-only-address
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox