diff options
author | Pedro J. Estébanez <pedrojrulez@gmail.com> | 2022-08-24 09:50:33 +0200 |
---|---|---|
committer | Pedro J. Estébanez <pedrojrulez@gmail.com> | 2022-10-05 20:10:47 +0200 |
commit | 6bf02c016236c2d79b3e8cf10cfb580157535e5f (patch) | |
tree | ddbeffddec3fa9c943d4f519e3ff211cd4e8e2c9 /core/os | |
parent | d331b803b8e63b0dab406a12c21805a17ee0a6a8 (diff) |
Keep a single, portable implementation of `OS::get_processor_count()`
Diffstat (limited to 'core/os')
-rw-r--r-- | core/os/os.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/os/os.cpp b/core/os/os.cpp index ee8da21751..62d6740685 100644 --- a/core/os/os.cpp +++ b/core/os/os.cpp @@ -38,6 +38,7 @@ #include "core/version_generated.gen.h" #include <stdarg.h> +#include <thread> OS *OS::singleton = nullptr; uint64_t OS::target_ticks = 0; @@ -321,7 +322,7 @@ String OS::get_unique_id() const { } int OS::get_processor_count() const { - return 1; + return std::thread::hardware_concurrency(); } String OS::get_processor_name() const { |