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
00049 #define HPTIME_TICKS_PER_SECOND (10000000I64)
00050 #define HPTIME_TICKS_PER_MILLISEC (10000I64)
00051 #define HPTIME_TICKS_PER_MICRO (10I64)
00052
00053 #elif defined(__unix__) || (defined(__APPLE__) && defined(__MACH__))
00054
00055 #include <stdint.h>
00056
00057 #ifndef DEVLIB_MTIME_DEFINED
00058 #define DEVLIB_MTIME_DEFINED 1
00059 typedef int32_t mtime_t;
00060 #define SIZEOF_MTIME_T (32 / CPU_BITS_PER_CHAR)
00061 #define MTIME_INFINITE 0x7FFFFFFFL
00062 #endif
00063
00065 typedef int64_t hptime_t;
00066
00067 #define HPTIME_TICKS_PER_SECOND (1000000LL)
00068 #define HPTIME_TICKS_PER_MILLISEC (1000LL)
00069 #define HPTIME_TICKS_PER_MICRO (1LL)
00070
00071 #else
00072 #error OS dependent support code missing for this OS
00073 #endif
00074
00078 extern hptime_t hptime_get(void);
00079
00080 #ifdef __cplusplus
00081 }
00082 #endif
00083
00084 #endif