Archived
1
Fork 0
This repository has been archived on 2025-04-12. You can view files and clone it, but cannot push or open issues or pull requests.
prism/engine/utility/include/timer.hpp
2020-08-11 12:07:21 -04:00

18 lines
371 B
C++
Executable file

#pragma once
#include <functional>
struct Timer {
std::function<void()> callback;
float duration = 0.0f;
float current_time = 0.0f;
bool remove_on_trigger = true;
bool continue_during_pause = true;
};
inline bool operator==(const Timer& a, const Timer& b) {
return a.duration == b.duration && a.current_time == b.current_time;
}