aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp
diff options
context:
space:
mode:
authorgvit <gvit@ydb.tech>2022-10-10 15:15:20 +0300
committergvit <gvit@ydb.tech>2022-10-10 15:15:20 +0300
commit6e51dcf19c076b2fe01b73080dd31d4de163f30b (patch)
treed31a7c98f7d5ff30dae5fee1f50373e8006ac555 /library/cpp
parentfc0c8d87b9e0550c098581e408b6a2f2d0f878d8 (diff)
downloadydb-6e51dcf19c076b2fe01b73080dd31d4de163f30b.tar.gz
add test to reproduce the bug
Diffstat (limited to 'library/cpp')
-rw-r--r--library/cpp/yt/cpu_clock/clock-inl.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/library/cpp/yt/cpu_clock/clock-inl.h b/library/cpp/yt/cpu_clock/clock-inl.h
index ecec035618..f686822103 100644
--- a/library/cpp/yt/cpu_clock/clock-inl.h
+++ b/library/cpp/yt/cpu_clock/clock-inl.h
@@ -5,10 +5,12 @@
#include "clock.h"
#endif
-#ifdef _WIN32
-# include <intrin.h>
-#else
-# include <x86intrin.h>
+#if !defined(__arm__) && !defined(__aarch64__)
+# ifdef _WIN32
+# include <intrin.h>
+# else
+# include <x86intrin.h>
+# endif
#endif
namespace NYT {
@@ -17,7 +19,11 @@ namespace NYT {
inline TCpuInstant GetCpuInstant()
{
+#if !defined(__arm__) && !defined(__aarch64__)
return __rdtsc();
+#else
+ return MicroSeconds();
+#endif
}
////////////////////////////////////////////////////////////////////////////////