dispatch_after

Section: C Library Functions (3)
Page Index

BSD mandoc
Darwin  

NAME

dispatch_after - schedule blocks for deferred execution  

SYNOPSIS

Fd #include <dispatch/dispatch.h> Ft void Fo dispatch_after Fa dispatch_time_t when dispatch_queue_t queue void (^block)(void) Fc Ft void Fo dispatch_after_f Fa dispatch_time_t when dispatch_queue_t queue void *context void (*function)(void *) Fc  

DESCRIPTION

The Fn dispatch_after function submits the Fa block to the given Fa queue at the time specified by the Fa when parameter. The Fa when parameter is a value created by Fn dispatch_time or Fn dispatch_walltime . Submission of the block may be delayed by the system in order to improve power consumption and system performance. The system applies a leeway (see dispatch_source_set_timer3) that is equal to one tenth of the interval between Fa when and the time at which the function is called, with the leeway capped to at least one millisecond and at most one minute.

For a more detailed description about submitting blocks to queues, see dispatch_async3.  

CAVEATS

Fn dispatch_after retains the passed queue.

Specifying Vt DISPATCH_TIME_NOW as the Fa when parameter is supported, but is not as efficient as calling Fn dispatch_async .

The result of passing Vt DISPATCH_TIME_FOREVER as the Fa when parameter is undefined.

 

FUNDAMENTALS

The Fn dispatch_after function is a wrapper around Fn dispatch_after_f .  

SEE ALSO

dispatch(3), dispatch_async3, dispatch_time3


 

Index

NAME
SYNOPSIS
DESCRIPTION
CAVEATS
FUNDAMENTALS
SEE ALSO