🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.os2.programmer
Article #2025

Re: Timing the run time of an algorithm and accessing round up/round down

#2025
From: Paul Lyon
Date: Tue, 13 Oct 1992 03:45
28 lines
1895 bytes
In article <3956@copper.Denver.Colorado.EDU> rvaniwaa@copper.denver.colorado.edu (Ronald J. Vaniwaarden) writes:

   I am writing a program for which I need exact (as much as is possible)
   timings of the run time.  Using the emx compiler and the following code:
 
           [ Code fragment omitted...]

   This gives the real time between the two calles to clock().  What I need is
   the actual CPU time.  Is there anyway to get this??



Well, so I am not the only one who would like this :-) I do not understand
why there is no (documented) system call to return this information. It is 
clear from the discussion in _The Design of OS/2_ (pages 122 & 130),
that the kernel tracks processor usage time at least on a per thread basis.
I suspect, also, that the undocumented system call DosQProcStatus() will
return this information, but I do not know which field is the right one.
[At least, I infer this much from the structure declarations in 
the procstat.h header file included with the "killem" and "procs"
utilities I retrieved from hobbes... A number of the fields therein
are marked "don't know".]

Since we now have several IBM folks kind enough to field questions in
this newsgroup, would it possible for one of them to unravel this 
mystery for us?

Paul Lyon
Technical Details
Message-ID: <PLYON.92Oct12224549@emx.cc.utexas.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!cs.utexas.edu!ut-emx!emx.utexas.edu!plyon
References: <3956@copper.Denver.Colorado.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!cs.utexas.edu!ut-emx!emx.utexas.edu!plyon
From: plyon@emx.cc.utexas.edu (Paul Lyon)
Newsgroups: comp.os.os2.programmer
Subject: Re: Timing the run time of an algorithm and accessing round up/round down
Message-ID: <PLYON.92Oct12224549@emx.cc.utexas.edu>
Date: 13 Oct 92 03:45:48 GMT
References: <3956@copper.Denver.Colorado.EDU>
Sender: news@ut-emx.uucp
Distribution: usa
Organization: The University of Texas at Austin
Lines: 28
In-reply-to: rvaniwaa@copper.denver.colorado.edu's message of 4 Oct 92 03:52:38 GMT