aboutsummaryrefslogtreecommitdiff
path: root/Client/ThirdParty/libfixmath/fixtest/hiclock.c
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2021-12-01 13:34:22 +0800
committerchai <chaifix@163.com>2021-12-01 13:34:22 +0800
commit09abf1b529b4226f585ecfbb20866715b901755b (patch)
tree16929f2a6bee3ad4667bdd006cfcc1e683ab7210 /Client/ThirdParty/libfixmath/fixtest/hiclock.c
parent84d961f754c905b37420f4d1b3fee8f4e523e58a (diff)
+fpm
Diffstat (limited to 'Client/ThirdParty/libfixmath/fixtest/hiclock.c')
-rw-r--r--Client/ThirdParty/libfixmath/fixtest/hiclock.c56
1 files changed, 28 insertions, 28 deletions
diff --git a/Client/ThirdParty/libfixmath/fixtest/hiclock.c b/Client/ThirdParty/libfixmath/fixtest/hiclock.c
index 81f5b94..5ce58df 100644
--- a/Client/ThirdParty/libfixmath/fixtest/hiclock.c
+++ b/Client/ThirdParty/libfixmath/fixtest/hiclock.c
@@ -1,28 +1,28 @@
-#include "hiclock.h"
-#include <stddef.h>
-
-#if defined(__WIN32) || defined(__WIN64)
-LONGLONG HICLOCKS_PER_SEC = 0;
-
-void hiclock_init()
-{
- LARGE_INTEGER freq;
- QueryPerformanceFrequency(&freq);
- HICLOCKS_PER_SEC = freq.QuadPart;
-}
-#endif
-
-hiclock_t hiclock()
-{
-#if defined(__unix__)
- struct timeval clocks;
- gettimeofday(&clocks, NULL);
- return ((uint64_t)clocks.tv_sec * 1000000ULL) + clocks.tv_usec;
-#elif defined(__WIN32) || defined(__WIN64)
- LARGE_INTEGER clocks;
- QueryPerformanceCounter(&clocks);
- return clocks.QuadPart;
-#else
- return clock();
-#endif
-}
+#include "hiclock.h"
+#include <stddef.h>
+
+#if defined(__WIN32) || defined(__WIN64)
+LONGLONG HICLOCKS_PER_SEC = 0;
+
+void hiclock_init()
+{
+ LARGE_INTEGER freq;
+ QueryPerformanceFrequency(&freq);
+ HICLOCKS_PER_SEC = freq.QuadPart;
+}
+#endif
+
+hiclock_t hiclock()
+{
+#if defined(__unix__)
+ struct timeval clocks;
+ gettimeofday(&clocks, NULL);
+ return ((uint64_t)clocks.tv_sec * 1000000ULL) + clocks.tv_usec;
+#elif defined(__WIN32) || defined(__WIN64)
+ LARGE_INTEGER clocks;
+ QueryPerformanceCounter(&clocks);
+ return clocks.QuadPart;
+#else
+ return clock();
+#endif
+}