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 #ifndef __DISPATCH_TIME__
00022 #define __DISPATCH_TIME__
00023 
00024 #ifndef __DISPATCH_INDIRECT__
00025 #error "Please #include <xdispatch/dispatch.h> instead of this file directly."
00026 #include "base.h" 
00027 #endif
00028 
00029 #if defined(_WIN32) && _MSC_VER < 1600
00030 # include "../../core/platform/windows/stdint.h"
00031 #else
00032 # include <stdint.h>
00033 #endif
00034 
00035 __DISPATCH_BEGIN_DECLS
00036 
00037 struct timespec;
00038 
00039 
00040 #ifdef NSEC_PER_SEC
00041 #undef NSEC_PER_SEC
00042 #endif
00043 #ifdef USEC_PER_SEC
00044 #undef USEC_PER_SEC
00045 #endif
00046 #ifdef NSEC_PER_USEC
00047 #undef NSEC_PER_USEC
00048 #endif
00049 #ifdef NSEC_PER_MSEC
00050 #undef NSEC_PER_MSEC
00051 #endif
00052 #define NSEC_PER_SEC (uint64_t)1000000000
00053 #define NSEC_PER_MSEC (uint64_t)1000000
00054 #define USEC_PER_SEC (uint64_t)1000000
00055 #define NSEC_PER_USEC (uint64_t)1000
00056 
00065 typedef uint64_t dispatch_time_t;
00066 
00067 #define DISPATCH_TIME_NOW 0ull
00068 #define DISPATCH_TIME_FOREVER (~0ull)
00069 
00090 __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_4_0)
00091 DISPATCH_EXPORT DISPATCH_NOTHROW
00092 dispatch_time_t
00093 dispatch_time(dispatch_time_t when, int64_t delta);
00094 
00114 __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_4_0)
00115 DISPATCH_EXPORT DISPATCH_NOTHROW
00116 dispatch_time_t
00117 dispatch_walltime(const struct timespec *when, int64_t delta);
00118 
00119 __DISPATCH_END_DECLS
00120 
00121 #endif