Initial Commit
This commit is contained in:
26
include/pd/Timer.hpp
Normal file
26
include/pd/Timer.hpp
Normal file
@@ -0,0 +1,26 @@
|
||||
#pragma once
|
||||
|
||||
#include <3ds.h>
|
||||
|
||||
#include <pd/smart_ctor.hpp>
|
||||
|
||||
namespace Palladium {
|
||||
class Timer {
|
||||
public:
|
||||
Timer(bool autostart = true);
|
||||
~Timer() {}
|
||||
PD_SMART_CTOR(Timer)
|
||||
void Reset();
|
||||
void Tick();
|
||||
void Pause();
|
||||
void Resume();
|
||||
float Get();
|
||||
float GetLive();
|
||||
bool Running();
|
||||
|
||||
private:
|
||||
uint64_t last = 0;
|
||||
uint64_t current = 0;
|
||||
bool is_running = false;
|
||||
};
|
||||
} // namespace Palladium
|
||||
Reference in New Issue
Block a user