diff options
Diffstat (limited to 'Firestore/core/src/firebase')
3 files changed, 4 insertions, 4 deletions
diff --git a/Firestore/core/src/firebase/firestore/util/executor_libdispatch.mm b/Firestore/core/src/firebase/firestore/util/executor_libdispatch.mm index b40f0dd..5491fec 100644 --- a/Firestore/core/src/firebase/firestore/util/executor_libdispatch.mm +++ b/Firestore/core/src/firebase/firestore/util/executor_libdispatch.mm @@ -109,7 +109,7 @@ class TimeSlot { void Execute(); void RemoveFromSchedule(); - using TimePoint = std::chrono::time_point<std::chrono::system_clock, + using TimePoint = std::chrono::time_point<std::chrono::steady_clock, Executor::Milliseconds>; ExecutorLibdispatch* const executor_; @@ -129,7 +129,7 @@ TimeSlot::TimeSlot(ExecutorLibdispatch* const executor, Executor::TaggedOperation&& operation) : executor_{executor}, target_time_{std::chrono::time_point_cast<Executor::Milliseconds>( - std::chrono::system_clock::now()) + + std::chrono::steady_clock::now()) + delay}, tagged_{std::move(operation)} { } diff --git a/Firestore/core/src/firebase/firestore/util/executor_std.cc b/Firestore/core/src/firebase/firestore/util/executor_std.cc index 59197e1..f03a712 100644 --- a/Firestore/core/src/firebase/firestore/util/executor_std.cc +++ b/Firestore/core/src/firebase/firestore/util/executor_std.cc @@ -68,7 +68,7 @@ DelayedOperation ExecutorStd::Schedule(const Milliseconds delay, "Schedule: delay cannot be negative"); namespace chr = std::chrono; - const auto now = chr::time_point_cast<Milliseconds>(chr::system_clock::now()); + const auto now = chr::time_point_cast<Milliseconds>(chr::steady_clock::now()); const auto id = PushOnSchedule(std::move(tagged.operation), now + delay, tagged.tag); diff --git a/Firestore/core/src/firebase/firestore/util/executor_std.h b/Firestore/core/src/firebase/firestore/util/executor_std.h index 4ac62e1..58ef96f 100644 --- a/Firestore/core/src/firebase/firestore/util/executor_std.h +++ b/Firestore/core/src/firebase/firestore/util/executor_std.h @@ -55,7 +55,7 @@ class Schedule { // - each operation modifying the queue notifies the condition variable `cv_`. public: using Duration = std::chrono::milliseconds; - using Clock = std::chrono::system_clock; + using Clock = std::chrono::steady_clock; // Entries are scheduled using absolute time. using TimePoint = std::chrono::time_point<Clock, Duration>; |