diff options
Diffstat (limited to 'bench/latency.cc')
-rw-r--r-- | bench/latency.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/bench/latency.cc b/bench/latency.cc index f500cdf..4fb59ee 100644 --- a/bench/latency.cc +++ b/bench/latency.cc @@ -1,12 +1,11 @@ #include <benchmark/benchmark.h> -#include <unistd.h> - #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); } |