Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!lll-winken!ames!claris!apple!well!ewhac From: ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab) Newsgroups: comp.sys.amiga.tech Subject: Re: CPU Time Message-ID: <11393@well.UUCP> Date: 24 Apr 89 10:41:48 GMT References: <94@snll-arpagw.UUCP> Reply-To: ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab) Organization: The All New Whole Earth 'Lectronic Link (WELL). Lines: 22 Quote: "What did I do to deserve this?" -- Vila "How long a list would you like?" -- Avon In article <94@snll-arpagw.UUCP> paolucci@snll-arpagw.UUCP (Sam Paolucci) writes: >I'm writing a code which needs to know how much execution time it's using >up. Can anybody tell me how to get this information or written a routine >to do this? [ ... ] Far Back in the Mists of Ancient Time, in the days of Kickstart v21, the very information you're interested in was encoded in the Task structure. However, in a subsequent release, it got taken out. Perhaps one of the long standing AmiGuys might care to explain why. Funny, though; the TF_PROCTIME bit is still declared in exec/tasks.h Your best bet is to fiddle with the tc_Launch and tc_Switch fields to dispatch to a (brief!) routine to record accumulated time. You must set the TF_SWITCH and TF_LAUNCH bits in the tc_Flags field for these to have any effect. You should not assume that tc_Launch and tc_Switch are unused (i.e. someone else may be trying to use these, too). _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ Leo L. Schwab -- The Guy in The Cape INET: well!ewhac@ucbvax.Berkeley.EDU \_ -_ Recumbent Bikes: UUCP: pacbell > !{well,unicom}!ewhac O----^o The Only Way To Fly. hplabs / (pronounced "AE-wack") "Work FOR? I don't work FOR anybody! I'm just having fun." -- The Doctor