VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Crypto/jitterentropy-base-user.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Crypto/jitterentropy-base-user.h')
-rw-r--r--src/Crypto/jitterentropy-base-user.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/Crypto/jitterentropy-base-user.h b/src/Crypto/jitterentropy-base-user.h
index bfb3a605..3a33dcd6 100644
--- a/src/Crypto/jitterentropy-base-user.h
+++ b/src/Crypto/jitterentropy-base-user.h
@@ -70,7 +70,17 @@ typedef int32 ssize_t;
static VC_INLINE void jent_get_nstime(uint64 *out)
{
+#ifdef _M_ARM64
+ LARGE_INTEGER v = { 0 };
+#ifdef TC_WINDOWS_DRIVER
+ v = KeQueryPerformanceCounter(NULL);
+#else
+ QueryPerformanceCounter(&v);
+#endif
+ * out = v.QuadPart;
+#else
*out = __rdtsc();;
+#endif
}
#else