summaryrefslogtreecommitdiff
path: root/include/mbgl/util/constants.hpp
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <thiago@mapbox.com>2016-02-23 18:37:45 +0200
committerThiago Marcos P. Santos <thiago@mapbox.com>2016-02-26 03:52:02 +0200
commit59a45b8400c1c07b3163c2274b0b59115cc23351 (patch)
tree1f5e8bd9e4aeb54e92a9a6f169f8787f2cb70ce6 /include/mbgl/util/constants.hpp
parentc20b99f9a40b8b8632c34d67a1da104799506fe8 (diff)
downloadqtlocation-mapboxgl-59a45b8400c1c07b3163c2274b0b59115cc23351.tar.gz
[core] Add timeout for clock skew
If the server keeps sending replies considered from the client in the past (there is no way to tell if the server or client clock is wrong), the client will try to interpolate a valid expiration time based on the delta of the expiration intervals sent by the server. If the intervals are always the same, exponential backoff kicks in until we get a different expiration time from what we already have.
Diffstat (limited to 'include/mbgl/util/constants.hpp')
-rw-r--r--include/mbgl/util/constants.hpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/mbgl/util/constants.hpp b/include/mbgl/util/constants.hpp
index 9ddbcb2568..480020f2ca 100644
--- a/include/mbgl/util/constants.hpp
+++ b/include/mbgl/util/constants.hpp
@@ -1,6 +1,8 @@
#ifndef MBGL_UTIL_CONSTANTS
#define MBGL_UTIL_CONSTANTS
+#include <mbgl/util/chrono.hpp>
+
#include <cmath>
#include <string>
#include <vector>
@@ -23,6 +25,8 @@ extern const double MAX_ZOOM;
extern const uint64_t DEFAULT_MAX_CACHE_SIZE;
+extern const Duration CLOCK_SKEW_RETRY_TIMEOUT;
+
} // namespace util
namespace debug {