aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore/core/src/firebase/firestore/util/executor_std.cc
diff options
context:
space:
mode:
authorGravatar Konstantin Varlamov <var-const@users.noreply.github.com>2018-05-09 12:01:20 -0400
committerGravatar GitHub <noreply@github.com>2018-05-09 12:01:20 -0400
commit01ed7b20aec82163defd3e370e82ee9a83fbb951 (patch)
tree512c9be16a3536b63bea63e8307b31274cc745f8 /Firestore/core/src/firebase/firestore/util/executor_std.cc
parentdbcd179788a4cce4e9e3ae545e736148438c5c6f (diff)
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.
Diffstat (limited to 'Firestore/core/src/firebase/firestore/util/executor_std.cc')
-rw-r--r--Firestore/core/src/firebase/firestore/util/executor_std.cc2
1 files changed, 1 insertions, 1 deletions
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);