gzdoom/libraries/ZWidget/include/zwidget/core/timer.h

25 lines
347 B
C
Raw Normal View History

2023-12-26 23:44:40 +00:00
#pragma once
#include <functional>
class Widget;
class Timer
{
public:
Timer(Widget* owner);
~Timer();
void Start(int timeoutMilliseconds, bool repeat = true);
void Stop();
std::function<void()> FuncExpired;
private:
Widget* OwnerObj = nullptr;
Timer* PrevTimerObj = nullptr;
Timer* NextTimerObj = nullptr;
friend class Widget;
};