SetTimeBaseMasterClock
You can use the SetTimeBaseMasterClock function to assign a clock component to a time base. A time base derives its time from either a clock component or from another time base. Do not use this function to assign a clock to a movie's time base.
pascal void SetTimeBaseMasterClock (TimeBase slave,
Component clockMeister,
const TimeRecord *slaveZero);
slave
- Specifies the time base for this operation. Your application obtains this time base identifier from the
NewTimeBase function (described on page 2-297).
clockMeister
- Specifies the clock component to be assigned to this time base. Your application can obtain this component identifier from the Component Manager's
FindNextComponent routine (see the chapter "Component Manager" in Inside Macintosh: More Macintosh Toolbox
for more information about this routine).
slaveZero
- Contains a pointer to the time, in the clock's time scale, that corresponds to a 0 time value for the slave time base. This parameter allows you to set an offset between the time base and the clock component. Set this parameter to
nil if there is no offset.
SPECIAL CONSIDERATIONS
The SetTimeBaseMasterClock function cannot be called at interrupt time.
ERROR CODES
| invalidMovie | -2010 | This movie is corrupted or invalid |
SEE ALSO
You can use the GetTimeBaseMasterClock function, which is described in the next section, to determine the clock component that is assigned to a time base.