#ifndef UTIL_TIMER_H #define UTIL_TIMER_H #include #include #include namespace PresenceDetection { namespace Util { class Timer { public: Timer(); ~Timer(); void Start(int interval, std::function func); void Stop(); bool IsRunning() const noexcept; void Wait(); private: std::atomic m_run; std::thread m_thread; }; } // namespace Util } // namespace PresenceDetection #endif // UTIL_TIMER_H