summaryrefslogtreecommitdiff
path: root/include/mbgl/util/timer.hpp
blob: 7d76e3b79c1a3539cf447b8c7e6c9a71d766a625 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#pragma once

#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