mirror of
https://github.com/ZDoom/Raze.git
synced 2024-12-01 08:31:30 +00:00
26 lines
374 B
C++
26 lines
374 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;
|
|
|
|
void* TimerId = nullptr;
|
|
|
|
friend class Widget;
|
|
};
|