diff options
author | mattn <mattn.jp@gmail.com> | 2020-03-02 15:21:58 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-01 22:21:58 -0800 |
commit | ebd50d0cfa3664d454ffdf246fcd228c3b370a11 (patch) | |
tree | 7c8ebcd23e4fef2b38c01432eb91e9f10b69bcf9 /bench | |
parent | d465747660ecf9ebbaddf8c3db37e4a13d0c9103 (diff) | |
download | pthreadpool-ebd50d0cfa3664d454ffdf246fcd228c3b370a11.tar.gz |
Build on Windows/mingw64 (#6)
Support Windows/mingw64 build
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); } |