aboutsummaryrefslogtreecommitdiff
path: root/src/bench/MilliSleep.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/bench/MilliSleep.cpp')
-rw-r--r--src/bench/MilliSleep.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/bench/MilliSleep.cpp b/src/bench/MilliSleep.cpp
new file mode 100644
index 0000000000..991397a234
--- /dev/null
+++ b/src/bench/MilliSleep.cpp
@@ -0,0 +1,16 @@
+// Copyright (c) 2015 The Bitcoin Core developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include "bench.h"
+#include "main.h"
+#include "utiltime.h"
+
+static void Sleep100ms(benchmark::State& state)
+{
+ while (state.KeepRunning()) {
+ MilliSleep(100);
+ }
+}
+
+BENCHMARK(Sleep100ms);