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

Unified Diff: base/sys_info_unittest.cc

Issue 1417673009: base: SysInfo::Uptime() returns a TimeDelta (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update perf_provider_chromeos.cc (just updated in another CL) Created 5 years, 1 month 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/sys_info.cc ('k') | chrome/browser/caps/generate_state_json.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/sys_info_unittest.cc
diff --git a/base/sys_info_unittest.cc b/base/sys_info_unittest.cc
index 15ae0989b1d7d4590c1cf5570a980fa901d1e1df..127d93055aa37a07e3869e53599787a292f9be4e 100644
--- a/base/sys_info_unittest.cc
+++ b/base/sys_info_unittest.cc
@@ -56,13 +56,13 @@ TEST_F(SysInfoTest, OperatingSystemVersionNumbers) {
#endif
TEST_F(SysInfoTest, Uptime) {
- int64 up_time_1 = base::SysInfo::Uptime();
+ base::TimeDelta up_time_1 = base::SysInfo::Uptime();
// UpTime() is implemented internally using TimeTicks::Now(), which documents
// system resolution as being 1-15ms. Sleep a little longer than that.
base::PlatformThread::Sleep(base::TimeDelta::FromMilliseconds(20));
- int64 up_time_2 = base::SysInfo::Uptime();
- EXPECT_GT(up_time_1, 0);
- EXPECT_GT(up_time_2, up_time_1);
+ base::TimeDelta up_time_2 = base::SysInfo::Uptime();
+ EXPECT_GT(up_time_1.InMicroseconds(), 0);
+ EXPECT_GT(up_time_2.InMicroseconds(), up_time_1.InMicroseconds());
}
#if defined(OS_MACOSX) && !defined(OS_IOS)
« no previous file with comments | « base/sys_info.cc ('k') | chrome/browser/caps/generate_state_json.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698