Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Unified Diff: mojo/edk/system/test_utils.cc

Issue 1345583002: Add GetTimeTicksNow() to PlatformSupport. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: clarify Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/edk/system/test_utils.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/test_utils.cc
diff --git a/mojo/edk/system/test_utils.cc b/mojo/edk/system/test_utils.cc
index 823bcf4ea3d4caa393532d89764ccdc545d9ea0e..5d78b15522b45923c2669a41e12eadcc0662b547 100644
--- a/mojo/edk/system/test_utils.cc
+++ b/mojo/edk/system/test_utils.cc
@@ -79,11 +79,11 @@ Stopwatch::~Stopwatch() {
}
void Stopwatch::Start() {
- start_time_ = base::TimeTicks::Now();
+ start_time_ = platform_support_.GetTimeTicksNow();
}
MojoDeadline Stopwatch::Elapsed() {
- int64_t result = (base::TimeTicks::Now() - start_time_).InMicroseconds();
+ int64_t result = platform_support_.GetTimeTicksNow() - start_time_;
// |DCHECK_GE|, not |CHECK_GE|, since this may be performance-important.
DCHECK_GE(result, 0);
return static_cast<MojoDeadline>(result);
« no previous file with comments | « mojo/edk/system/test_utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698