The Vertical Retrace Manager
Originally, the Vertical Retrace Manager handled the queuing and execution of
tasks scheduled to run during VBL interrupts, which occurred each time the
electron beam in the video screen returned from the lower-right to the
upper-left corner of the built-in screen. The VBL interrupts occurred at a
known frequency (once every sixtieth of a second), and an application could use
the VInstall function to schedule execution of a task once or continually after some specified number of VBL interrupts. In this way, your application could
schedule periodic tasks even before the
Once it became possible to use external monitors with certain Macintosh
computers, the Vertical Retrace Manager was changed to support different
refresh rates and multiple queues. New slot-based VBL interrupts were
added-one for each attached video device, with a rate determined by that video
device. The older once-a-tick VBL interrupts were retained, however, for
compatibility reasons. So an application can still schedule routines for
execution during a slot-generated VBL interrupt (using the slot VInstall function) or during a system-generated VBL interrupt (using the original
VInstall). In either case, the indicated routine runs at the future time specified
in the call.
You can use either the Time Manager or the Vertical Retrace Manager to schedule future or periodic tasks. The main difference between the two
scheduling methods is the precision with which those tasks can be scheduled.
You can call system-generated VBL tasks with a minimum period of 1 tick
(one-sixtieth of a second), which is approximately 16 milliseconds. You can
call slot-generated VBL tasks with a minimum period that depends on the
refresh rate of the particular video device associated with that slot, which is
usually close to 1 tick. The extended
Time Manager routines provide much finer resolution, up to 20 microseconds. Hence, the resolution of the Time Manager is about 1000 times greater than that of the Vertical Retrace Manager. So in cases where
very high resolution is important, you should use the Time Manager routines instead of the Vertical Retrace Manager routines.
Unlike the Time Manager, the Vertical Retrace Manager is not an absolute time mechanism. Its operations are always relative to the VBL interrupt,
which may be disabled (for instance, during disk access). As a result, you
should use the Time Manager in cases where absolute time delays are important. Use the Vertical Retrace Manager, however, in cases where the
scheduled actions need simply to be synchronized with other VBL tasks, such as
cursor movement or screen refresh. Applications that do animation on the
screen (for example, some games or multimedia applications) are the kinds of
programs that should probably use VBL tasks instead of