mirror of
https://github.com/edubart/otclient.git
synced 2025-10-19 05:53:26 +02:00
fix ctrl+g
This commit is contained in:
@@ -48,5 +48,20 @@ private:
|
||||
|
||||
extern Clock g_clock;
|
||||
|
||||
class Timer
|
||||
{
|
||||
public:
|
||||
Timer() { restart(); }
|
||||
|
||||
void restart() { m_startTicks = g_clock.ticks(); }
|
||||
|
||||
ticks_t startTicks() { return m_startTicks; }
|
||||
ticks_t ticksElapsed() { return g_clock.ticks() - m_startTicks; }
|
||||
double timeElapsed() { return ticksElapsed()/1000.0; }
|
||||
|
||||
private:
|
||||
ticks_t m_startTicks;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user