mirror of
https://github.com/Sani7/remote-ui.git
synced 2026-10-26 21:51:13 +01:00
15 lines
323 B
C++
15 lines
323 B
C++
#pragma once
|
|
#include <chrono>
|
|
#include <thread>
|
|
|
|
class Timer {
|
|
public:
|
|
Timer(void (*function)());
|
|
void setTimeout(std::chrono::milliseconds delay);
|
|
void setInterval(std::chrono::milliseconds interval);
|
|
void stop();
|
|
private:
|
|
bool p_clear = false;
|
|
std::mutex p_clear_mutex;
|
|
void (*function)();
|
|
}; |