diff options
Diffstat (limited to 'bench')
-rw-r--r-- | bench/latency.cc | 3 |
1 files changed, 2 insertions, 1 deletions
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 <pthreadpool.h> +#include <thread> 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); } |