* CPU Timer on VADS Needed
@ 1986-07-13 1:05 Bryan
1986-07-28 14:35 ` Eric Marshall
0 siblings, 1 reply; 2+ messages in thread
From: Bryan @ 1986-07-13 1:05 UTC (permalink / raw)
We have just acquired a Sequent B8000 running BSD4.2 Unix,
and the Verdix compiler. Has anyone written a CPU timer
interface to Unix that can be called from Ada? Would
appreciate any leads. To be specific, we need a package
body that implements the following spec:
package Cpu_Timer is
function Cpu return Duration;
-- returns accumulated Cpu for a process
end Cpu_Timer;
Thanks in advance. Doug & Geoff
-------
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: CPU Timer on VADS Needed
1986-07-13 1:05 CPU Timer on VADS Needed Bryan
@ 1986-07-28 14:35 ` Eric Marshall
0 siblings, 0 replies; 2+ messages in thread
From: Eric Marshall @ 1986-07-28 14:35 UTC (permalink / raw)
I couldn't reach Bryan@SU-SIERRA.ARPA, so I'm posting
it here. See 'man times' for more information. Hope this helps.
----- 8< ----- 8< ----- 8< ----- 8< ----- 8< ----- 8< ----- 8< ----- 8< -----
package cpu_timer is
function cpu return duration;
end cpu_timer;
-------------------------------------------------------------------
with system;
use system;
package body cpu_timer is
function cpu return duration is
type time_record is record
user_time,
system_time,
children_user_time,
children_system_time : integer;
end record;
answer : time_record;
procedure times( param : address );
pragma interface( c, times );
begin
times( answer'address );
return duration( duration( answer.user_time ) / duration( 60.0 ) );
----------------------------
|
|
----- put the expression to meet your
requirements regarding what CPU
time is, ie. ( user_time +
system_time +
children_user_time +
children_system_time )
end cpu;
end cpu_timer;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1986-07-28 14:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1986-07-13 1:05 CPU Timer on VADS Needed Bryan
1986-07-28 14:35 ` Eric Marshall
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox