This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdio> | |
#include <chrono> | |
#include <string> | |
class benchmark | |
{ | |
using clock = std::chrono::steady_clock; | |
public: | |
benchmark(std::string location, unsigned line) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// workaround for old msvc preprocessor: | |
// https://stackoverflow.com/questions/5134523/msvc-doesnt-expand-va-args-correctly | |
#define ETS_EXP(x) x | |
#define ETS_CASE(e, x) \ | |
case e::x: \ | |
return #x; | |
#define ETS_FE_0(e) | |
#define ETS_FE_1(e, x) ETS_CASE(e, x) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include <boost/predef/os.h> | |
#include <boost/asio/steady_timer.hpp> | |
#include <chrono> | |
#include <initializer_list> | |
#if BOOST_OS_LINUX |