mirror of
https://github.com/J-D-K/JKSV.git
synced 2026-03-22 09:44:19 -05:00
22 lines
543 B
C++
22 lines
543 B
C++
#pragma once
|
|
#include <cstdint>
|
|
|
|
namespace sys
|
|
{
|
|
class timer
|
|
{
|
|
public:
|
|
// Inits timer with current ticks
|
|
timer(uint32_t triggerTicks);
|
|
// Restarts timer. Sets starting ticks to current
|
|
void restartTimer(void);
|
|
// Returns if triggerTicks has been reached.
|
|
bool triggered(void);
|
|
|
|
private:
|
|
// Starting tick count
|
|
uint32_t m_StartingTicks = 0;
|
|
// Trigger tick count
|
|
uint32_t m_TriggerTicks = 0;
|
|
};
|
|
} |