Changeset View
Changeset View
Standalone View
Standalone View
src/bench/Examples.cpp
// Copyright (c) 2015-2016 The Bitcoin Core developers | // Copyright (c) 2015-2016 The Bitcoin Core developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#include "bench.h" | #include "bench.h" | ||||
#include "defaults.h" | |||||
#include "utiltime.h" | #include "utiltime.h" | ||||
#include "validation.h" | #include "validation.h" | ||||
// Sanity test: this should loop ten times, and | // Sanity test: this should loop ten times, and | ||||
// min/max/average should be close to 100ms. | // min/max/average should be close to 100ms. | ||||
static void Sleep100ms(benchmark::State &state) { | static void Sleep100ms(benchmark::State &state) { | ||||
while (state.KeepRunning()) { | while (state.KeepRunning()) { | ||||
MilliSleep(100); | MilliSleep(100); | ||||
Show All 19 Lines |