Carbon


Timer Duration Constants

Header: Multiprocessing.h

Specify the maximum time a task should wait for an event to occur.

enum {
    kDurationImmediate = 0,
    kDurationForever = 2147483647,
    kDurationMillisecond = 1,
    kDurationMicrosecond = -1
};

Constant descriptions

kDurationImmediate

The task times out immediately, whether or not the event has occurred. If the event occurred, the return status is noErr. If the event did not occur, the return status is kMPTimeoutErr (assuming no other errors occurred).

kDurationForever

The task waits forever. The blocking call waits until either the event occurs, or until the object being waited upon (such as a message queue) is deleted.

kDurationMillisecond

The task waits one millisecond before timing out.

kDurationMicrosecond

The task waits one microsecond before timing out.

You can use these constants in conjunction with other values to indicate specific wait intervals. For example, to wait 1 second, you can pass kDurationMillisecond * 1000.

VERSION NOTES

Introduced with Multiprocessing Services 2.0.


© 2000 Apple Computer, Inc. (Last Updated 7/13/2000)