xdg-desktop-portal-hyprland/src/helpers/Timer.hpp

17 lines
357 B
C++
Raw Normal View History

2023-09-06 20:36:48 +02:00
#pragma once
#include <functional>
#include <chrono>
class CTimer {
public:
CTimer(float ms, std::function<void()> callback);
bool passed() const;
std::function<void()> m_fnCallback;
private:
std::chrono::high_resolution_clock::time_point m_tStart;
float m_fDuration;
};