summaryrefslogtreecommitdiffstats
path: root/src/util.h
diff options
context:
space:
mode:
authorEvan Martin <martine@danga.com>2012-07-28 20:32:23 (GMT)
committerEvan Martin <martine@danga.com>2012-07-28 20:32:23 (GMT)
commitdcaa573cc2e6f30d346262b3c42d4497a539d90d (patch)
tree5c324652fcbd25b97e5f993693517f2172062668 /src/util.h
parent0f56b0e5ebe20eccefe064875d15acb3b9378e2a (diff)
downloadNinja-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.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/util.h b/src/util.h
index 5caf644..9267091 100644
--- a/src/util.h
+++ b/src/util.h
@@ -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();