🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #12273

Re: CPU Time

#12273
From: John Kaminski
Date: Sun, 16 Apr 1989 22:29
7 lines
897 bytes
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().
Technical Details
Message-ID: <5299@cs.Buffalo.EDU>
Path: arc1-ca.pugleaf.net!utzoo!dptcdc!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!rutgers!sunybcs!ugkamins
References: <94@snll-arpagw.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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