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 
00029 #ifndef __DISPATCH_INDIRECT__
00030 #error "Please #include <dispatch/dispatch.h> instead of this file directly."
00031 #include "base.h" 
00032 #endif
00033 
00034 #if !defined(__GNUC__) && defined(_WIN32) && _MSC_VER < 1600
00035 # include "../../core/platform/windows/stdint.h"
00036 #else
00037 # include <stdint.h>
00038 #endif
00039 
00040 __DISPATCH_BEGIN_DECLS
00041 
00042 struct timespec;
00043 
00044 
00045 #ifdef NSEC_PER_SEC
00046 #undef NSEC_PER_SEC
00047 #endif
00048 #ifdef USEC_PER_SEC
00049 #undef USEC_PER_SEC
00050 #endif
00051 #ifdef NSEC_PER_USEC
00052 #undef NSEC_PER_USEC
00053 #endif
00054 #ifdef NSEC_PER_MSEC
00055 #undef NSEC_PER_MSEC
00056 #endif
00057 #define NSEC_PER_SEC (uint64_t)1000000000
00058 #define NSEC_PER_MSEC (uint64_t)1000000
00059 #define USEC_PER_SEC (uint64_t)1000000
00060 #define NSEC_PER_USEC (uint64_t)1000
00061 
00069 typedef uint64_t dispatch_time_t;
00070 
00071 #define DISPATCH_TIME_NOW 0ull
00072 #define DISPATCH_TIME_FOREVER (~0ull)
00073 
00091 DISPATCH_EXPORT 
00092 dispatch_time_t
00093 dispatch_time(dispatch_time_t when, int64_t delta);
00094 
00111 DISPATCH_EXPORT 
00112 dispatch_time_t
00113 dispatch_walltime(const struct timespec *when, int64_t delta);
00114 
00115 __DISPATCH_END_DECLS
00116 
00119 #endif