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.8 required=5.0 tests=BAYES_00,INVALID_DATE, MSGID_SHORT autolearn=no autolearn_force=no version=3.4.4 Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!think!caip!cbmvax!bpa!burdvax!eric From: eric@burdvax.UUCP (Eric Marshall) Newsgroups: net.lang.ada Subject: Re: CPU Timer on VADS Needed Message-ID: <2590@burdvax.UUCP> Date: Mon, 28-Jul-86 10:35:14 EDT Article-I.D.: burdvax.2590 Posted: Mon Jul 28 10:35:14 1986 Date-Received: Wed, 30-Jul-86 00:45:48 EDT References: <12222213850.15.BRYAN@su-sierra.arpa> Organization: System Development Corp., Paoli, PA List-Id: 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;