mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-11-10 05:11:38 +01:00
14 lines
680 B
Diff
14 lines
680 B
Diff
diff --git a/third_party/benchmark/src/cycleclock.h b/third_party/benchmark/src/cycleclock.h
|
|
index 9bef594..cc4a433 100644
|
|
--- a/third_party/benchmark/src/cycleclock.h
|
|
+++ b/third_party/benchmark/src/cycleclock.h
|
|
@@ -167,7 +167,7 @@ inline BENCHMARK_ALWAYS_INLINE int64_t Now() {
|
|
struct timeval tv;
|
|
gettimeofday(&tv, nullptr);
|
|
return static_cast<int64_t>(tv.tv_sec) * 1000000 + tv.tv_usec;
|
|
-#elif defined(__mips__) || defined(__m68k__)
|
|
+#elif defined(__mips__) || defined(__m68k__) || defined(__loongarch64)
|
|
// mips apparently only allows rdtsc for superusers, so we fall
|
|
// back to gettimeofday. It's possible clock_gettime would be better.
|
|
struct timeval tv;
|