ADC Home > Reference Library > Technical Q&As > Legacy Documents > Mac OS 9 & Earlier >

Legacy Documentclose button

Important: This document is part of the Legacy section of the ADC Reference Library. This information should not be used for new development.

Current information on this Reference Library topic can be found here:

Detecting the Microseconds Trap

Q I am creating FAT applications, and I'm using the Microseconds trap. This helps to keep my common source code simple, because I don't have to use the Time Manager to do timings on 68K machines and Microseconds on PPC machines. Which versions of the System software include the Microseconds trap, and on which models is this included?

A You have to detect the availability of the Micrososeconds trap with the TrapAvailable routine, because its availability varies with the software that is installed and on the version of the System software that is used. Microseconds was first implemented in QuickTime, which could optionally be installed as far back as System 6.0.7. Microseconds wasn't officially documented until the release of Inside Macintosh: Operating System Utilities.

The following code can be used to detect the Microseconds trap:

#define _Microseconds 0xa193 // from traps.h

if (GetToolTrapAddress(_Microseconds) == GetToolTrapAddres(_Unimplemented))
 // use extended time manager
else
 // use Microseconds

[Jun 01 1995]


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.