1dispatch_after(3)        BSD Library Functions Manual        dispatch_after(3)
2

NAME

4     dispatch_after — schedule blocks for deferred execution
5

SYNOPSIS

7     #include <dispatch/dispatch.h>
8
9     void
10     dispatch_after(dispatch_time_t when, dispatch_queue_t queue,
11         void (^block)(void));
12
13     void
14     dispatch_after_f(dispatch_time_t when, dispatch_queue_t queue,
15         void *context, void (*function)(void *));
16

DESCRIPTION

18     The dispatch_after() function submits the block to the given queue at the
19     time specified by the when parameter.  The when parameter is a value cre‐
20     ated by dispatch_time() or dispatch_walltime().  Submission of the block
21     may be delayed by the system in order to improve power consumption and
22     system performance.  The system applies a leeway (see
23     dispatch_source_set_timer(3)) that is equal to one tenth of the interval
24     between when and the time at which the function is called, with the lee‐
25     way capped to at least one millisecond and at most one minute.
26
27     For a more detailed description about submitting blocks to queues, see
28     dispatch_async(3).
29

CAVEATS

31     dispatch_after() retains the passed queue.
32
33     Specifying DISPATCH_TIME_NOW as the when parameter is supported, but is
34     not as efficient as calling dispatch_async().
35
36     The result of passing DISPATCH_TIME_FOREVER as the when parameter is
37     undefined.
38

FUNDAMENTALS

40     The dispatch_after() function is a wrapper around dispatch_after_f().
41

SEE ALSO

43     dispatch(3), dispatch_async(3), dispatch_time(3)
44
45Darwin                            May 1, 2009                           Darwin
Impressum