xref: /trueos/lib/libdispatch/man/dispatch_after.3 (revision bf5f91cb28c5878845eb00fbf329c042f6c643c9)
1.\" Copyright (c) 2008-2010 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
19The
20.Fn dispatch_after
21function submits the
22.Fa block
23to the given
24.Fa queue
25at the time specified by the
26.Fa when
27parameter.
28The
29.Fa when
30parameter is a value created by
31.Fn dispatch_time
32or
33.Fn dispatch_walltime .
34.Pp
35For a more detailed description about submitting blocks to queues, see
36.Xr dispatch_async 3 .
37.Sh CAVEATS
38.Fn dispatch_after
39retains the passed queue.
40.Pp
41Specifying
42.Vt DISPATCH_TIME_NOW
43as the
44.Fa when
45parameter
46is supported, but is not as efficient as calling
47.Fn dispatch_async .
48.Pp
49The result of passing
50.Vt DISPATCH_TIME_FOREVER
51as the
52.Fa when
53parameter is undefined.
54.Pp
55.Sh FUNDAMENTALS
56The
57.Fn dispatch_after
58function is a wrapper around
59.Fn dispatch_after_f .
60.Sh SEE ALSO
61.Xr dispatch 3 ,
62.Xr dispatch_async 3 ,
63.Xr dispatch_time 3
64