From 01ed7b20aec82163defd3e370e82ee9a83fbb951 Mon Sep 17 00:00:00 2001 From: Konstantin Varlamov Date: Wed, 9 May 2018 12:01:20 -0400 Subject: Firestore C++: in AsyncQueue, use steady_clock instead of system_clock. (#1246) This should prevent weird bugs due to system time readjustments. Because operations are scheduled relative to now, the fact that the resulting timepoint isn't in Unix epoch shouldn't matter. --- Firestore/core/src/firebase/firestore/util/executor_std.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Firestore/core/src/firebase/firestore/util/executor_std.cc') 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(chr::system_clock::now()); + const auto now = chr::time_point_cast(chr::steady_clock::now()); const auto id = PushOnSchedule(std::move(tagged.operation), now + delay, tagged.tag); -- cgit v1.2.3