aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkTime.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/SkTime.cpp')
-rw-r--r--src/core/SkTime.cpp23
1 files changed, 0 insertions, 23 deletions
diff --git a/src/core/SkTime.cpp b/src/core/SkTime.cpp
index 72b9aced51..fa6c04447d 100644
--- a/src/core/SkTime.cpp
+++ b/src/core/SkTime.cpp
@@ -22,26 +22,3 @@ void SkTime::DateTime::toISO8601(SkString* dst) const {
timeZoneMinutes);
}
}
-
-// TODO: use std::chrono on Mach too, when available.
-
-#if defined(__MACH__)
- #include "SkOncePtr.h"
- #include <mach/mach_time.h>
- SK_DECLARE_STATIC_ONCE_PTR(double, ns_per_tick);
- double SkTime::GetNSecs() {
- uint64_t ticks = mach_absolute_time();
- return ticks * *ns_per_tick.get([]{
- mach_timebase_info_data_t timebase;
- (void)mach_timebase_info(&timebase);
- return new double(timebase.numer * 1.0 / timebase.denom);
- });
- }
-#else
- #include <chrono>
- double SkTime::GetNSecs() {
- auto now = std::chrono::high_resolution_clock::now();
- std::chrono::duration<double, std::nano> ns = now.time_since_epoch();
- return ns.count();
- }
-#endif