diff options
author | deanm@google.com <deanm@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-27 13:48:03 +0000 |
---|---|---|
committer | deanm@google.com <deanm@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-27 13:48:03 +0000 |
commit | db71728e5bc139ecfa97823e5613d882257cef4c (patch) | |
tree | 773f60b5e5db3b4f2e10c442f5fd11f2fa88d870 /base/perftimer.cc | |
parent | 32065cfaaf2ef49d9e4cbbbcf21e92dcb3b10072 (diff) | |
download | chromium_src-db71728e5bc139ecfa97823e5613d882257cef4c.zip chromium_src-db71728e5bc139ecfa97823e5613d882257cef4c.tar.gz chromium_src-db71728e5bc139ecfa97823e5613d882257cef4c.tar.bz2 |
Make perftimer and run_all_perftests compile on Posix. Stub out a few things into process_util_posix, and add a function to raise to a high priority.
BUG=1343318
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1438 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/perftimer.cc')
-rw-r--r-- | base/perftimer.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/base/perftimer.cc b/base/perftimer.cc index 4f31e55..1231923 100644 --- a/base/perftimer.cc +++ b/base/perftimer.cc @@ -3,13 +3,11 @@ // found in the LICENSE file. #include <stdio.h> -#include <shlwapi.h> -#include <windows.h> #include "base/perftimer.h" -#include "base/logging.h" #include "base/basictypes.h" +#include "base/logging.h" static FILE* perf_log_file = NULL; @@ -20,7 +18,12 @@ bool InitPerfLog(const char* log_file) { return false; } +#if defined(OS_WIN) return fopen_s(&perf_log_file, log_file, "w") == 0; +#elif defined(OS_POSIX) + perf_log_file = fopen(log_file, "w"); + return perf_log_file != NULL; +#endif } void FinalizePerfLog() { @@ -41,5 +44,3 @@ void LogPerfResult(const char* test_name, double value, const char* units) { fprintf(perf_log_file, "%s\t%g\t%s\n", test_name, value, units); printf("%s\t%g\t%s\n", test_name, value, units); } - - |