Add typedefs for std::chrono::steady_clock types

This commit is contained in:
John Firebaugh
2015-04-01 14:05:37 -07:00
committed by Konstantin Käfer
parent 440864063e
commit 9331acf8e6
34 changed files with 203 additions and 182 deletions

View File

@@ -1,6 +1,7 @@
#include <mbgl/storage/default/http_request.hpp>
#include <mbgl/storage/default/http_context.hpp>
#include <mbgl/storage/response.hpp>
#include <mbgl/util/chrono.hpp>
#include <mbgl/platform/log.hpp>
#include <mbgl/util/time.hpp>
@@ -551,7 +552,7 @@ int64_t parseCacheControl(const char *value) {
// http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9
if (std::sscanf(value, "max-age=%llu", &seconds) == 1) {
return std::chrono::duration_cast<std::chrono::seconds>(
std::chrono::system_clock::now().time_since_epoch()).count() +
SystemClock::now().time_since_epoch()).count() +
seconds;
}
}