diff options
author | Leith Bade <leith@mapbox.com> | 2015-02-03 13:54:12 +1100 |
---|---|---|
committer | Leith Bade <leith@mapbox.com> | 2015-02-04 09:39:25 +1100 |
commit | 89bbd29278b40e8de1e369ee54325d4d3098bf65 (patch) | |
tree | c8da5fc881c4ebff56766eb99db81c53e5563892 /src/mbgl/renderer/frame_history.hpp | |
parent | 33b4922220d19a5049072b59cbad01358099b1cf (diff) | |
download | qtlocation-mapboxgl-89bbd29278b40e8de1e369ee54325d4d3098bf65.tar.gz |
Use std::chrono
Diffstat (limited to 'src/mbgl/renderer/frame_history.hpp')
-rw-r--r-- | src/mbgl/renderer/frame_history.hpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mbgl/renderer/frame_history.hpp b/src/mbgl/renderer/frame_history.hpp index 61bb59da33..f56b391256 100644 --- a/src/mbgl/renderer/frame_history.hpp +++ b/src/mbgl/renderer/frame_history.hpp @@ -4,15 +4,15 @@ #include <deque> #include <cassert> #include <cmath> +#include <chrono> #include <mbgl/platform/platform.hpp> -#include <mbgl/util/time.hpp> namespace mbgl { struct FrameSnapshot { - explicit inline FrameSnapshot(timestamp t_, float z_) : t(t_), z(z_) {} - float t; + explicit inline FrameSnapshot(std::chrono::steady_clock::time_point now_, float z_) : now(now_), z(z_) {} + std::chrono::steady_clock::time_point now; float z; }; @@ -26,10 +26,10 @@ struct FadeProperties { class FrameHistory { public: // Record frame history that will be used to calculate fading params - void record(timestamp now, float zoom); + void record(std::chrono::steady_clock::time_point now, float zoom); - bool needsAnimation(timestamp duration) const; - FadeProperties getFadeProperties(timestamp duration); + bool needsAnimation(std::chrono::steady_clock::duration duration) const; + FadeProperties getFadeProperties(std::chrono::steady_clock::duration duration); public: std::deque<FrameSnapshot> history; |