From ebd50d0cfa3664d454ffdf246fcd228c3b370a11 Mon Sep 17 00:00:00 2001 From: mattn Date: Mon, 2 Mar 2020 15:21:58 +0900 Subject: Build on Windows/mingw64 (#6) Support Windows/mingw64 build --- bench/latency.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'bench') diff --git a/bench/latency.cc b/bench/latency.cc index f500cdf..e72ea49 100644 --- a/bench/latency.cc +++ b/bench/latency.cc @@ -4,9 +4,10 @@ #include +#include static void SetNumberOfThreads(benchmark::internal::Benchmark* benchmark) { - const int max_threads = sysconf(_SC_NPROCESSORS_ONLN); + const int max_threads = std::thread::hardware_concurrency(); for (int t = 1; t <= max_threads; t++) { benchmark->Arg(t); } -- cgit v1.2.3