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

Unified Diff: net/test/local_test_server_posix.cc

Issue 13890022: Use base::TimeTicks instead of base::Time to resolve flaky tests using local_test_server_posix.cc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/test/local_test_server_posix.cc
diff --git a/net/test/local_test_server_posix.cc b/net/test/local_test_server_posix.cc
index f655b97ac267f7700c13bbb843357094098e8576..27fe282cd26ebbfcfea48eb1d9430a1915c8212c 100644
--- a/net/test/local_test_server_posix.cc
+++ b/net/test/local_test_server_posix.cc
@@ -60,7 +60,7 @@ class OrphanedTestServerFilter : public base::ProcessFilter {
bool ReadData(int fd, ssize_t bytes_max, uint8* buffer,
base::TimeDelta* remaining_time) {
ssize_t bytes_read = 0;
- base::Time previous_time = base::Time::Now();
+ base::TimeTicks previous_time = base::TimeTicks::Now();
while (bytes_read < bytes_max) {
struct pollfd poll_fds[1];
@@ -79,7 +79,7 @@ bool ReadData(int fd, ssize_t bytes_max, uint8* buffer,
return false;
}
- base::Time current_time = base::Time::Now();
+ base::TimeTicks current_time = base::TimeTicks::Now();
base::TimeDelta elapsed_time_cycle = current_time - previous_time;
DCHECK_GE(elapsed_time_cycle.InMilliseconds(), 0);
*remaining_time -= elapsed_time_cycle;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698