mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-12-11 13:11:48 +00:00
24 lines
347 B
C++
24 lines
347 B
C++
#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;
|
|
};
|