aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--Firestore/core/src/firebase/firestore/util/executor_libdispatch.mm4
-rw-r--r--Firestore/core/src/firebase/firestore/util/executor_std.cc2
-rw-r--r--Firestore/core/src/firebase/firestore/util/executor_std.h2
-rw-r--r--Firestore/core/test/firebase/firestore/util/async_tests_util.h4
4 files changed, 6 insertions, 6 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>;
diff --git a/Firestore/core/test/firebase/firestore/util/async_tests_util.h b/Firestore/core/test/firebase/firestore/util/async_tests_util.h
index 422745b..f953d66 100644
--- a/Firestore/core/test/firebase/firestore/util/async_tests_util.h
+++ b/Firestore/core/test/firebase/firestore/util/async_tests_util.h
@@ -27,11 +27,11 @@ namespace firebase {
namespace firestore {
namespace util {
-inline std::chrono::time_point<std::chrono::system_clock,
+inline std::chrono::time_point<std::chrono::steady_clock,
std::chrono::milliseconds>
now() {
return std::chrono::time_point_cast<std::chrono::milliseconds>(
- std::chrono::system_clock::now());
+ std::chrono::steady_clock::now());
}
constexpr auto kTimeout = std::chrono::seconds(5);