summaryrefslogtreecommitdiff
path: root/test/storage
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2016-01-23 14:47:17 +0200
committerBruno de Oliveira Abinader <bruno@mapbox.com>2016-01-25 15:11:18 +0200
commit2f86467586706d254fcbcb1c88657992214aefcd (patch)
tree97c34a7c1589ba32cc981b47792983d057c3b996 /test/storage
parentcc47da5a15650c3f8ede9f7e253e4099dc61673f (diff)
downloadqtlocation-mapboxgl-2f86467586706d254fcbcb1c88657992214aefcd.tar.gz
Cleanup std::chrono usage
Use mbgl::Duration and mbgl::{,Milli}Seconds whenever possible.
Diffstat (limited to 'test/storage')
-rw-r--r--test/storage/cache_size.cpp3
-rw-r--r--test/storage/http_retry_network_status.cpp6
2 files changed, 5 insertions, 4 deletions
diff --git a/test/storage/cache_size.cpp b/test/storage/cache_size.cpp
index 7a98e1c835..b0d59d5934 100644
--- a/test/storage/cache_size.cpp
+++ b/test/storage/cache_size.cpp
@@ -6,6 +6,7 @@
#include <mbgl/util/run_loop.hpp>
#include <mbgl/util/string.hpp>
#include <mbgl/util/timer.hpp>
+#include <mbgl/util/chrono.hpp>
#include <memory>
#include <random>
@@ -186,7 +187,7 @@ TEST_F(Storage, CacheSizePruneLeastAccessed) {
bool done = false;
util::Timer timer;
- timer.start(std::chrono::milliseconds(1300),
+ timer.start(Milliseconds(1300),
Duration::zero(),
[&done] { done = true; });
diff --git a/test/storage/http_retry_network_status.cpp b/test/storage/http_retry_network_status.cpp
index 4598b8e402..df9284f995 100644
--- a/test/storage/http_retry_network_status.cpp
+++ b/test/storage/http_retry_network_status.cpp
@@ -37,14 +37,14 @@ TEST_F(Storage, HTTPNetworkStatusChange) {
// After 50 milliseconds, we're going to trigger a NetworkStatus change.
util::Timer reachableTimer;
- reachableTimer.start(std::chrono::milliseconds(50), Duration::zero(), [] () {
+ reachableTimer.start(Milliseconds(50), Duration::zero(), [] () {
mbgl::NetworkStatus::Reachable();
});
// This timer will keep the loop alive to make sure we would be getting a response in caes the
// network status change triggered another change (which it shouldn't).
util::Timer delayTimer;
- delayTimer.start(std::chrono::milliseconds(300), Duration::zero(), [] () {});
+ delayTimer.start(Milliseconds(300), Duration::zero(), [] () {});
loop.run();
}
@@ -100,7 +100,7 @@ TEST_F(Storage, HTTPNetworkStatusChangePreempt) {
// After 400 milliseconds, we're going to trigger a NetworkStatus change.
util::Timer reachableTimer;
- reachableTimer.start(std::chrono::milliseconds(400), Duration::zero(), [] () {
+ reachableTimer.start(Milliseconds(400), Duration::zero(), [] () {
mbgl::NetworkStatus::Reachable();
});