]> git.saurik.com Git - apple/libdispatch.git/blob - man/dispatch_after.3
libdispatch-84.5.tar.gz
[apple/libdispatch.git] / man / dispatch_after.3
1 .\" Copyright (c) 2008-2009 Apple Inc. All rights reserved.
2 .Dd May 1, 2009
3 .Dt dispatch_after 3
4 .Os Darwin
5 .Sh NAME
6 .Nm dispatch_after
7 .Nd schedule blocks for deferred execution
8 .Sh SYNOPSIS
9 .Fd #include <dispatch/dispatch.h>
10 .Ft void
11 .Fo dispatch_after
12 .Fa "dispatch_time_t when" "dispatch_queue_t queue" "void (^block)(void)"
13 .Fc
14 .Ft void
15 .Fo dispatch_after_f
16 .Fa "dispatch_time_t when" "dispatch_queue_t queue" "void *context" "void (^function)(void *)"
17 .Fc
18 .Sh DESCRIPTION
19 The
20 .Fn dispatch_after
21 function submits the
22 .Fa block
23 to the given
24 .Fa queue
25 at the time specified by the
26 .Fa when
27 parameter.
28 The
29 .Fa when
30 parameter is a value created by
31 .Fn dispatch_time
32 or
33 .Fn dispatch_walltime .
34 .Pp
35 For a more detailed description about submitting blocks to queues, see
36 .Xr dispatch_async 3 .
37 .Sh CAVEATS
38 Specifying
39 .Vt DISPATCH_TIME_NOW
40 as the
41 .Fa when
42 parameter
43 is supported, but is not as efficient as calling
44 .Fn dispatch_async .
45 The result of passing
46 .Vt DISPATCH_TIME_FOREVER
47 as the
48 .Fa when
49 parameter is undefined.
50 .Sh FUNDAMENTALS
51 The
52 .Fn dispatch_after
53 function is a wrapper around
54 .Fn dispatch_after_f .
55 .Sh SEE ALSO
56 .Xr dispatch_async 3 ,
57 .Xr dispatch_time 3