summaryrefslogtreecommitdiffstats
path: root/chrome/test/chrome_process_util.cc
diff options
context:
space:
mode:
authorjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-10 16:35:47 +0000
committerjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-10 16:35:47 +0000
commit85632fab9c8f30b4651f06fd75e1ba5881226e6c (patch)
tree45e5c31224f7b5951fbefb387da4f3fbf7acbd85 /chrome/test/chrome_process_util.cc
parent99aae10b7b9cd4c1e08bb4e978c822483864e331 (diff)
downloadchromium_src-85632fab9c8f30b4651f06fd75e1ba5881226e6c.zip
chromium_src-85632fab9c8f30b4651f06fd75e1ba5881226e6c.tar.gz
chromium_src-85632fab9c8f30b4651f06fd75e1ba5881226e6c.tar.bz2
Switch to using TimeTicks for profiling and histograms
Avoid using wall clock time, which can be changed by the user, or impacted by Daylight Savings transitions etc. BUG=14193 r=eroman Review URL: http://codereview.chromium.org/1253005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46821 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/chrome_process_util.cc')
-rw-r--r--chrome/test/chrome_process_util.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/chrome/test/chrome_process_util.cc b/chrome/test/chrome_process_util.cc
index 8e86e60..a3c4d6f 100644
--- a/chrome/test/chrome_process_util.cc
+++ b/chrome/test/chrome_process_util.cc
@@ -12,8 +12,8 @@
#include "chrome/common/chrome_constants.h"
#include "chrome/common/result_codes.h"
-using base::Time;
using base::TimeDelta;
+using base::TimeTicks;
void TerminateAllChromeProcesses(base::ProcessId browser_pid) {
// Total time the function will wait for chrome processes
@@ -38,11 +38,11 @@ void TerminateAllChromeProcesses(base::ProcessId browser_pid) {
for (it = handles.begin(); it != handles.end(); ++it)
base::KillProcess(*it, ResultCodes::TASKMAN_KILL, false);
- const Time start = Time::Now();
+ const TimeTicks start = TimeTicks::Now();
for (it = handles.begin();
- it != handles.end() && Time::Now() - start < kExitTimeout;
+ it != handles.end() && TimeTicks::Now() - start < kExitTimeout;
++it) {
- int64 wait_time_ms = (Time::Now() - start).InMilliseconds();
+ int64 wait_time_ms = (TimeTicks::Now() - start).InMilliseconds();
base::WaitForSingleProcess(*it, wait_time_ms);
}