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

Unified Diff: base/time/time_win_unittest.cc

Issue 864943002: Replaces instances of the deprecated TimeTicks::HighResNow() with TimeTicks::Now(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More changes based on review comments. Created 5 years, 11 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 | « base/time/time_unittest.cc ('k') | cc/debug/lap_timer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/time/time_win_unittest.cc
diff --git a/base/time/time_win_unittest.cc b/base/time/time_win_unittest.cc
index 71cd29ee1981805fb8b47bfe193bf8fc9f1f06ab..82be8c5254dd7e2722829e6997cf9d99202092c9 100644
--- a/base/time/time_win_unittest.cc
+++ b/base/time/time_win_unittest.cc
@@ -116,8 +116,8 @@ TEST(TimeTicks, WinRollover) {
}
TEST(TimeTicks, SubMillisecondTimers) {
- // HighResNow doesn't work on some systems. Since the product still works
- // even if it doesn't work, it makes this entire test questionable.
+ // IsHighResolution() is false on some systems. Since the product still works
+ // even if it's false, it makes this entire test questionable.
if (!TimeTicks::IsHighResolution())
return;
@@ -126,11 +126,11 @@ TEST(TimeTicks, SubMillisecondTimers) {
// Run kRetries attempts to see a sub-millisecond timer.
for (int index = 0; index < kRetries; index++) {
- TimeTicks last_time = TimeTicks::HighResNow();
+ TimeTicks last_time = TimeTicks::Now();
TimeDelta delta;
// Spin until the clock has detected a change.
do {
- delta = TimeTicks::HighResNow() - last_time;
+ delta = TimeTicks::Now() - last_time;
} while (delta.InMicroseconds() == 0);
if (delta.InMicroseconds() < 1000) {
saw_submillisecond_timer = true;
@@ -193,10 +193,10 @@ TEST(TimeTicks, TimerPerformance) {
int test_case = 0;
while (cases[test_case].func) {
- TimeTicks start = TimeTicks::HighResNow();
+ TimeTicks start = TimeTicks::Now();
for (int index = 0; index < kLoops; index++)
cases[test_case].func();
- TimeTicks stop = TimeTicks::HighResNow();
+ TimeTicks stop = TimeTicks::Now();
// Turning off the check for acceptible delays. Without this check,
// the test really doesn't do much other than measure. But the
// measurements are still useful for testing timers on various platforms.
« no previous file with comments | « base/time/time_unittest.cc ('k') | cc/debug/lap_timer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698