[comp.sys.mac.programmer] Periodic actions in DRVR's

resnick@lees.cogsci.uiuc.edu (Pete Resnick) (06/28/90)

I am writing a driver using THINK C 4.0 and would like it to to use
the needTime feature so that I get control calls every so often to check
a flag. (No, I can't do this in interrupt, because I need to allocate
memory. Yes, I know that drivers that allocate memory are not nice; it's
only 1-2K.) Upon entering the driver for the system Control call, all I do
is check the flag. If it's set, I do my thing, but if it's clear, I just
drop through and return noErr. How much system resource am I using here?
For instance, right now I have the delay set to 60 (checking it once a
second), but if I set my delay time to 0 (i.e. as often as possible) am
I going to bring a Mac Plus to it's knees? Or will this only happen if
some programmer calls SystemTask every other line? How can I figure out
what resources I am using?

pr
--
Pete Resnick             (...so what is a mojo, and why would one be rising?)
Graduate assistant - Philosophy Department, Gregory Hall, UIUC
System manager - Cognitive Science Group, Beckman Institute, UIUC
Internet/ARPAnet/EDUnet  : resnick@kant.cogsci.uiuc.edu
BITNET (if no other way) : FREE0285@UIUCVMD