From baf30cd1f776ec0a44688c12580bacf45e33c93c Mon Sep 17 00:00:00 2001 From: "Thiago Marcos P. Santos" Date: Sun, 29 Nov 2015 00:27:34 +0200 Subject: [glfw] Main loop integration This new code can be used for rendering on the Main thread while it will also work for rendering on the Map thread before we make the switch. Needed by #2909. --- include/mbgl/util/timer.hpp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 include/mbgl/util/timer.hpp (limited to 'include/mbgl/util/timer.hpp') diff --git a/include/mbgl/util/timer.hpp b/include/mbgl/util/timer.hpp new file mode 100644 index 0000000000..783241847d --- /dev/null +++ b/include/mbgl/util/timer.hpp @@ -0,0 +1,29 @@ +#ifndef MBGL_UTIL_TIMER +#define MBGL_UTIL_TIMER + +#include +#include + +#include +#include + +namespace mbgl { +namespace util { + +class Timer : private util::noncopyable { +public: + Timer(); + ~Timer(); + + void start(Duration timeout, Duration repeat, std::function&&); + void stop(); + +private: + class Impl; + std::unique_ptr impl; +}; + +} // namespace util +} // namespace mbgl + +#endif -- cgit v1.2.1