Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
27 lines
429 B
C++
27 lines
429 B
C++
#pragma once
|
|
|
|
#include <mln/util/noncopyable.hpp>
|
|
#include <mln/util/chrono.hpp>
|
|
|
|
#include <memory>
|
|
#include <functional>
|
|
|
|
namespace mln {
|
|
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 mln
|