Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!uwm.edu!ux1.cso.uiuc.edu!lees.cogsci.uiuc.edu!resnick From: resnick@lees.cogsci.uiuc.edu (Pete Resnick) Newsgroups: comp.sys.mac.programmer Subject: Periodic actions in DRVR's Message-ID: <1990Jun27.195323.7459@ux1.cso.uiuc.edu> Date: 27 Jun 90 19:53:23 GMT Sender: usenet@ux1.cso.uiuc.edu (News) Distribution: comp Organization: University of Illinois at Urbana Lines: 20 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