Path: utzoo!dptcdc!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!rutgers!sunybcs!ugkamins From: ugkamins@sunybcs.uucp (John Kaminski) Newsgroups: comp.sys.amiga.tech Subject: Re: CPU Time Message-ID: <5299@cs.Buffalo.EDU> Date: 16 Apr 89 22:29:44 GMT References: <94@snll-arpagw.UUCP> Sender: nobody@cs.Buffalo.EDU Reply-To: ugkamins@sunybcs.UUCP (John Kaminski) Organization: SUNY/Buffalo Computer Science Lines: 7 The easiest (best?) way I can think of doing your timings is to use FindTask(0) (find your task) and insert some code for VOID (*tc_Switch)() and VOID (*tc_Launch)(), and inside this, read the timer.device, GETSYSTIME and perhaps using the timer.device library routines for time subtraction. Switch is for when your task is losing the CPU and Launch is for when the task is getting the CPU back. Either try this, or do the 'ole Forbid() and Permit().