home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!stanford.edu!kronos.arc.nasa.gov!joshr
- From: joshr@kronos.arc.nasa.gov (Joshua Rabinowitz-Summer-91)
- Subject: Re: How do I sleep w/o using any CPU time
- Message-ID: <1992Jul24.000928.10355@kronos.arc.nasa.gov>
- Sender: usenet@kronos.arc.nasa.gov (Will Edgington, wedgingt@ptolemy.arc.nasa.gov)
- Nntp-Posting-Host: kronos-arclan.arc.nasa.gov
- Organization: NASA/ARC Information Sciences Division
- References: <a684a397@spicewood.uucp> <28474@goofy.Apple.COM>
- Date: Fri, 24 Jul 1992 00:09:28 GMT
- Lines: 29
-
- In article <28474@goofy.Apple.COM> dwb@apple.com (David W. Berry) writes:
- >In article <a684a397@spicewood.uucp>, you write:
- >> I am writing an application to check something every so often. If
- >> something exists, I will then put up an error window. Everything is
- >Typed in off the type of my head, so this isn't error checked (or really
- >even syntax checked) but it will give you the general idea...
- >
- >pascal void Delay(long ticks)
- >{
- > long wakeTime = TickCount() + ticks;
- > long delay;
- > EventRecord event;
- >
- > while((delay = (wakeTime - TickCount()) > 0)
- > WaitNextEvent(0, &event, delay, 0);
- >}
-
- The only problem with this, as I remember it
- (and please correct me if I'm wrong),
- that apple events cannot be masked. I looked in inside mac for this, but
- could not find a reference to this ?fact?. (looked at The Event Manager,
- IM VI, p. 5-29) I cannot recall where I got this idea from.
-
- Can anyone refute or back up this belief?
- --
- ----------------------------------
- #include <std/disclaimer.h> Josh Rabinowitz, Mac TCL programmer
- joshr@kronos.arc.nasa.gov
- "'I see', said the blind carpenter, as he picked up his hammer and saw".
-