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

Unified Diff: net/quic/platform/impl/quic_chromium_clock.cc

Issue 2894173002: Use faster clock_gettime() instead of sysctl() to get current ticks on iOS10 (Closed)
Patch Set: Remove unused includes Created 3 years, 7 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
« base/time/time_mac.cc ('K') | « base/time/time_mac.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/platform/impl/quic_chromium_clock.cc
diff --git a/net/quic/platform/impl/quic_chromium_clock.cc b/net/quic/platform/impl/quic_chromium_clock.cc
index fb591f842feffedc69d6145f50771c62b7e1ac14..2349cfce3c06b3cc822ea95841b6b60fc95fc034 100644
--- a/net/quic/platform/impl/quic_chromium_clock.cc
+++ b/net/quic/platform/impl/quic_chromium_clock.cc
@@ -4,12 +4,6 @@
#include "net/quic/platform/impl/quic_chromium_clock.h"
-#if defined(OS_IOS)
-#include <time.h>
-
-#include "base/ios/ios_util.h"
-#endif
-
#include "base/memory/singleton.h"
#include "base/time/time.h"
@@ -29,15 +23,6 @@ QuicTime QuicChromiumClock::ApproximateNow() const {
}
QuicTime QuicChromiumClock::Now() const {
-#if defined(OS_IOS)
- if (base::ios::IsRunningOnIOS10OrLater()) {
- struct timespec tp;
- if (clock_gettime(CLOCK_MONOTONIC, &tp) == 0) {
- return CreateTimeFromMicroseconds(tp.tv_sec * 1000000 +
- tp.tv_nsec / 1000);
- }
- }
-#endif
return CreateTimeFromMicroseconds(base::TimeTicks::Now().ToInternalValue());
miu 2017/05/22 22:16:14 Please fix: This is invalid use of ToInternalValue
kapishnikov 2017/05/23 17:56:51 Done.
}
« base/time/time_mac.cc ('K') | « base/time/time_mac.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698