From 85632fab9c8f30b4651f06fd75e1ba5881226e6c Mon Sep 17 00:00:00 2001 From: "jar@chromium.org" Date: Mon, 10 May 2010 16:35:47 +0000 Subject: 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 --- chrome/test/chrome_process_util.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'chrome/test/chrome_process_util.cc') 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); } -- cgit v1.1