aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore/core/test
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/test
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/test')
-rw-r--r--Firestore/core/test/firebase/firestore/util/async_tests_util.h4
1 files changed, 2 insertions, 2 deletions
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);