Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/BLAKE2/BLAKE2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bench/bench.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/bench/bench.c b/bench/bench.c
index 09ae88a..8488728 100644
--- a/bench/bench.c
+++ b/bench/bench.c
@@ -43,6 +43,11 @@ static unsigned long long cpucycles( void ) {
__asm__ __volatile__( ".byte 15;.byte 49;" : "=A" ( result ) );
return result;
}
+#elif defined(_MSC_VER)
+#include <intrin.h>
+static unsigned long long cpucycles( void ) {
+ return __rdtsc();
+}
#else
#error "Don't know how to count cycles on this platform!"
#endif