diff options
author | chai <chaifix@163.com> | 2021-11-30 22:25:37 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-11-30 22:25:37 +0800 |
commit | 9e0e01b7f4375063f06e494113187d48614628e0 (patch) | |
tree | 21a4901612ad92c121f4c887a33b1bbbe87c6b00 /Client/ThirdParty/libfixmath/fixtest/hiclock.h |
+init
Diffstat (limited to 'Client/ThirdParty/libfixmath/fixtest/hiclock.h')
-rw-r--r-- | Client/ThirdParty/libfixmath/fixtest/hiclock.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/Client/ThirdParty/libfixmath/fixtest/hiclock.h b/Client/ThirdParty/libfixmath/fixtest/hiclock.h new file mode 100644 index 0000000..7cabf47 --- /dev/null +++ b/Client/ThirdParty/libfixmath/fixtest/hiclock.h @@ -0,0 +1,33 @@ +#ifndef __hiclock_h__ +#define __hiclock_h__ + +#include <stdint.h> +#include <inttypes.h> + +#if defined(__unix__) +#include <sys/time.h> +#define PRIuHICLOCK PRIu64 +#define PRIiHICLOCK PRIi64 +typedef uint64_t hiclock_t; +#define HICLOCKS_PER_SEC 1000000 +#define hiclock_init() +#elif defined(__WIN32) || defined(__WIN64) +#include <windows.h> +#define PRIuHICLOCK PRIu64 +#define PRIiHICLOCK PRIi64 +typedef LONGLONG hiclock_t; +extern LONGLONG HICLOCKS_PER_SEC; +extern void hiclock_init(); +#else +#include <time.h> +#define PRIuHICLOCK PRIu32 +#define PRIiHICLOCK PRIi32 +typedef clock_t hiclock_t; +#define HICLOCKS_PER_SEC CLOCKS_PER_SEC +#define hiclock_init() +#endif + +extern hiclock_t hiclock(); + +#endif + |