1 #pragma once 2 3 #include <mbgl/util/noncopyable.hpp> 4 #include <mbgl/util/chrono.hpp> 5 6 #include <memory> 7 #include <functional> 8 9 namespace mbgl { 10 namespace util { 11 12 class Timer : private util::noncopyable { 13 public: 14 Timer(); 15 ~Timer(); 16 17 void start(Duration timeout, Duration repeat, std::function<void()>&&); 18 void stop(); 19 20 private: 21 class Impl; 22 std::unique_ptr<Impl> impl; 23 }; 24 25 } // namespace util 26 } // namespace mbgl 27