31 lines
458 B
C++
31 lines
458 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();
|
|
void unref();
|
|
|
|
private:
|
|
class Impl;
|
|
std::unique_ptr<Impl> impl;
|
|
};
|
|
|
|
}
|
|
}
|
|
|
|
#endif
|