Files
MapLibreParticleLab/include/mbgl/util/timer.hpp
Thiago Marcos P. Santos baf30cd1f7 [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.
2016-03-21 23:58:48 -03:00

30 lines
476 B
C++

#ifndef MBGL_UTIL_TIMER
#define MBGL_UTIL_TIMER
#include <mbgl/util/noncopyable.hpp>
#include <mbgl/util/chrono.hpp>
#include <memory>
#include <functional>
namespace mbgl {
namespace util {
class Timer : private util::noncopyable {
public:
Timer();
~Timer();
void start(Duration timeout, Duration repeat, std::function<void()>&&);
void stop();
private:
class Impl;
std::unique_ptr<Impl> impl;
};
} // namespace util
} // namespace mbgl
#endif