XDispatch 0.6.1
Defines | Typedefs | Functions
time.h File Reference
#include "base.h"
#include <stdint.h>

Go to the source code of this file.

Defines

#define NSEC_PER_SEC   (uint64_t)1000000000
#define NSEC_PER_MSEC   (uint64_t)1000000
#define USEC_PER_SEC   (uint64_t)1000000
#define NSEC_PER_USEC   (uint64_t)1000
#define DISPATCH_TIME_NOW   0ull
#define DISPATCH_TIME_FOREVER   (~0ull)

Typedefs

typedef uint64_t dispatch_time_t
 An somewhat abstract representation of time; where zero means "now" and DISPATCH_TIME_FOREVER means "infinity" and every value in between is an opaque encoding.

Functions

DISPATCH_NOTHROW dispatch_time_t dispatch_time (dispatch_time_t when, int64_t delta)
 dispatch_time
DISPATCH_NOTHROW dispatch_time_t dispatch_walltime (const struct timespec *when, int64_t delta)
 dispatch_walltime

Define Documentation

#define DISPATCH_TIME_FOREVER   (~0ull)

Definition at line 68 of file time.h.

#define DISPATCH_TIME_NOW   0ull

Definition at line 67 of file time.h.

#define NSEC_PER_MSEC   (uint64_t)1000000

Definition at line 53 of file time.h.

#define NSEC_PER_SEC   (uint64_t)1000000000

Definition at line 52 of file time.h.

#define NSEC_PER_USEC   (uint64_t)1000

Definition at line 55 of file time.h.

#define USEC_PER_SEC   (uint64_t)1000000

Definition at line 54 of file time.h.


Typedef Documentation

An somewhat abstract representation of time; where zero means "now" and DISPATCH_TIME_FOREVER means "infinity" and every value in between is an opaque encoding.

Definition at line 65 of file time.h.


Function Documentation

DISPATCH_NOTHROW dispatch_time_t dispatch_time ( dispatch_time_t  when,
int64_t  delta 
)

dispatch_time

Create dispatch_time_t relative to the default clock or modify an existing dispatch_time_t.

On Mac OS X the default clock is based on mach_absolute_time().

Parameters:
whenAn optional dispatch_time_t to add nanoseconds to. If zero is passed, then dispatch_time() will use the result of mach_absolute_time().
deltaNanoseconds to add.
Returns:
A new dispatch_time_t.
DISPATCH_NOTHROW dispatch_time_t dispatch_walltime ( const struct timespec *  when,
int64_t  delta 
)

dispatch_walltime

Create a dispatch_time_t using the wall clock.

On Mac OS X the wall clock is based on gettimeofday(3).

Parameters:
whenA struct timespect to add time to. If NULL is passed, then dispatch_walltime() will use the result of gettimeofday(3).
deltaNanoseconds to add.
Returns:
A new dispatch_time_t.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Thu Apr 12 2012 09:50:43 for XDispatch by Doxygen 1.7.4
© 2010-2012 MLBA (about | privacy) All Rights reserved.