comp.lang.ada
 help / color / mirror / Atom feed
* CPU time for Win32 & GNAT
@ 2001-10-12 11:21 Gautier
  2001-10-12 13:50 ` Pat Rogers
  2001-10-12 14:36 ` Ted Dennison
  0 siblings, 2 replies; 10+ messages in thread
From: Gautier @ 2001-10-12 11:21 UTC (permalink / raw)


Hi!

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...

TIA

________________________________________________________
Gautier  --  http://www.mysunrise.ch/users/gdm/gsoft.htm

NB: Do not answer to sender address, visit the Web site!
    Ne r�pondez pas � l'exp�diteur, visitez le site ouaibe!



^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re: CPU time for Win32 & GNAT
@ 2001-10-14 19:54 Gautier Write-only-address
  2001-10-15 14:33 ` Ted Dennison
  0 siblings, 1 reply; 10+ messages in thread
From: Gautier Write-only-address @ 2001-10-14 19:54 UTC (permalink / raw)
  To: comp.lang.ada

Ted:

> > I think he wants elapsed CPU time for his process, not for the whole
>system.
> > That would essentially just give him wall time (really really precise 
>wall
> > time).
> >
> > Is that instruction avalilable in ring 3?

Pat:

>I can't say.  (I know I can trust you -- I just don't know!  :-)

Effectively, I'm looking for the time elapsed during the
process, not the wall-clock time.

Ideally I'm looking for something like

  function Process_Clock return Process_Time;

and of course...

  function "-"(T2,T1:Process_Time) return Duration;

but just an indication of a Win32 function to use would already
be sufficient (I'll do the rest!).

Thx

Gautier


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp




^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re: CPU time for Win32 & GNAT
@ 2001-10-15  9:47 Gautier Write-only-address
  0 siblings, 0 replies; 10+ messages in thread
From: Gautier Write-only-address @ 2001-10-15  9:47 UTC (permalink / raw)
  To: comp.lang.ada

Sune Falck

>If you want to fetch elapsed time, cpu time in user mode and cpu time
>in kernel mode have a look at the system call GetProcessTimes.

Thank you very much! It seems to be exactly what I'm looking for.
____________________________________________________________
Gautier  --  http://www.mysunrise.ch/users/gdm/index.htm#Ada

NB: Do not answer to sender address, visit the Web site!
    Ne r�pondez pas � l'exp�diteur, visitez le site ouaibe!


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp




^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2001-10-15 14:33 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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