Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef __DISPATCH_TIME__
00025 #define __DISPATCH_TIME__
00026
00027 #ifndef __DISPATCH_INDIRECT__
00028 #error "Please #include <xdispatch/dispatch.h> instead of this file directly."
00029 #include "base.h"
00030 #endif
00031
00032 #include <stdint.h>
00033
00034 __DISPATCH_BEGIN_DECLS
00035
00036 struct timespec;
00037
00038
00039 #ifdef NSEC_PER_SEC
00040 #undef NSEC_PER_SEC
00041 #endif
00042 #ifdef USEC_PER_SEC
00043 #undef USEC_PER_SEC
00044 #endif
00045 #ifdef NSEC_PER_USEC
00046 #undef NSEC_PER_USEC
00047 #endif
00048 #ifdef NSEC_PER_MSEC
00049 #undef NSEC_PER_MSEC
00050 #endif
00051 #define NSEC_PER_SEC 1000000000ll
00052 #define NSEC_PER_MSEC 1000000ll
00053 #define USEC_PER_SEC 1000000ll
00054 #define NSEC_PER_USEC 1000ll
00055
00064 typedef uint64_t dispatch_time_t;
00065
00066 #define DISPATCH_TIME_NOW 0
00067 #define DISPATCH_TIME_FOREVER (~0ull)
00068
00089 DISPATCH_EXPORT dispatch_time_t
00090 dispatch_time(dispatch_time_t when, int64_t delta);
00091
00111 DISPATCH_EXPORT dispatch_time_t
00112 dispatch_walltime(const struct timespec *when, int64_t delta);
00113
00114 __DISPATCH_END_DECLS
00115
00116 #endif