summaryrefslogtreecommitdiffstats
path: root/src/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/util.h b/src/util.h
index 016e6cf..fd91772 100644
--- a/src/util.h
+++ b/src/util.h
@@ -14,7 +14,6 @@
#ifndef NINJA_UTIL_H_
#define NINJA_UTIL_H_
-#pragma once
#ifdef _WIN32
#include "win32port.h"
@@ -53,11 +52,6 @@ int ReadFile(const string& path, string* contents, string* err);
/// Mark a file descriptor to not be inherited on exec()s.
void SetCloseOnExec(int fd);
-/// Get the current time as relative to some epoch.
-/// Epoch varies between platforms; only useful for measuring elapsed
-/// time.
-int64_t GetTimeMillis();
-
/// Given a misspelled string and a list of correct spellings, returns
/// the closest match or NULL if there is no close enough match.
const char* SpellcheckStringV(const string& text, const vector<const char*>& words);
@@ -68,11 +62,16 @@ 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 load average of the machine. A negative value is returned
+/// on error.
+double GetLoadAverage();
+
#ifdef _MSC_VER
#define snprintf _snprintf
#define fileno _fileno
#define unlink _unlink
#define chdir _chdir
+#define strtoull _strtoui64
#endif
#ifdef _WIN32