diff options
author | Evan Martin <martine@danga.com> | 2012-07-28 20:32:23 (GMT) |
---|---|---|
committer | Evan Martin <martine@danga.com> | 2012-07-28 20:32:23 (GMT) |
commit | dcaa573cc2e6f30d346262b3c42d4497a539d90d (patch) | |
tree | 5c324652fcbd25b97e5f993693517f2172062668 /src/util.h | |
parent | 0f56b0e5ebe20eccefe064875d15acb3b9378e2a (diff) | |
download | Ninja-dcaa573cc2e6f30d346262b3c42d4497a539d90d.zip Ninja-dcaa573cc2e6f30d346262b3c42d4497a539d90d.tar.gz Ninja-dcaa573cc2e6f30d346262b3c42d4497a539d90d.tar.bz2 |
move processor-count code to util.cc
Diffstat (limited to 'src/util.h')
-rw-r--r-- | src/util.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -62,6 +62,10 @@ const char* SpellcheckString(const string& text, ...); /// Removes all Ansi escape codes (http://www.termsys.demon.co.uk/vtansi.htm). string StripAnsiEscapeCodes(const string& in); +/// @return the number of processors on the machine. Useful for an initial +/// guess for how many jobs to run in parallel. @return 0 on error. +int GetProcessorCount(); + /// @return the load average of the machine. A negative value is returned /// on error. double GetLoadAverage(); |