hptime.h
Go to the documentation of this file.00001
00037 #ifndef HPTIME_H
00038 #define HPTIME_H
00039
00040 #ifdef __cplusplus
00041 extern "C" {
00042 #endif
00043
00044 #ifdef _WIN32
00045
00047 typedef __int64 hptime_t;
00048 #define SIZEOF_HPTIME_T 8
00049
00050 #define HPTIME_TICKS_PER_SECOND (10000000I64)
00051 #define HPTIME_TICKS_PER_MILLISEC (10000I64)
00052 #define HPTIME_TICKS_PER_MICRO (10I64)
00053
00054 #elif defined(__unix__) || (defined(__APPLE__) && defined(__MACH__))
00055
00056 #include <stdint.h>
00057
00058 #ifndef DEVLIB_MTIME_DEFINED
00059 #define DEVLIB_MTIME_DEFINED 1
00060 typedef int32_t mtime_t;
00061 #define SIZEOF_MTIME_T (32 / CPU_BITS_PER_CHAR)
00062 #define MTIME_INFINITE 0x7FFFFFFFL
00063 #endif
00064
00066 typedef int64_t hptime_t;
00067 #define SIZEOF_HPTIME_T 8
00068
00069 #define HPTIME_TICKS_PER_SECOND (1000000LL)
00070 #define HPTIME_TICKS_PER_MILLISEC (1000LL)
00071 #define HPTIME_TICKS_PER_MICRO (1LL)
00072
00073 #else
00074 #error OS dependent support code missing for this OS
00075 #endif
00076
00080 extern hptime_t hptime_get(void);
00081
00082 #ifdef __cplusplus
00083 }
00084 #endif
00085
00086 #endif