[comp.sys.mac.programmer] Portable timer events

robertj@unreal.uucp (Young Rob Jellinghaus) (03/26/91)

I'm working on some code that wants to be able to receive timer events
when nothing else is happening.  (i.e. the user's not clicking or
typing, and my app wants to be occasionally awakened to do something.)
What's the best way to write code in the main event loop of my app
that will periodically awaken my timer-handler when no other events
are being posted?

I know VBL tasks and suchlike are a whole huge can of worms, especially
with regard to portability.  Can I rely on null events to come in con-
sistently?  Or is this an awful mess?
--
Rob Jellinghaus                 | "Next time you see a lie being spread or
Autodesk, Inc.                  |  a bad decision being made out of sheer
robertj@Autodesk.COM            |  ignorance, pause, and think of hypertext."
{decwrl,uunet}!autodesk!robertj |    -- K. Eric Drexler, _Engines of Creation_