mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-28 00:12:40 +00:00
Initial commit
This commit is contained in:
commit
147188b143
427 files changed
+205923
No files matched your search
@@ -0,0 +1,40 @@
|
||||
#include "common/timer.h"
|
||||
|
||||
#include "common/abi.h"
|
||||
#include "common/dateTime.h"
|
||||
#include "common/subsystems.h"
|
||||
#include "loader/timer.h"
|
||||
|
||||
namespace Loader::Timer {
|
||||
|
||||
static Common::Timer g_timer;
|
||||
|
||||
KYTY_SUBSYSTEM_INIT(Timer) {
|
||||
Start();
|
||||
}
|
||||
|
||||
KYTY_SUBSYSTEM_UNEXPECTED_SHUTDOWN(Timer) {}
|
||||
|
||||
KYTY_SUBSYSTEM_DESTROY(Timer) {}
|
||||
|
||||
void Start() {
|
||||
g_timer.Start();
|
||||
}
|
||||
|
||||
double GetTimeMs() {
|
||||
return g_timer.GetTimeMs();
|
||||
}
|
||||
|
||||
Common::Time GetTime() {
|
||||
return Common::Time(static_cast<int>(GetTimeMs()));
|
||||
}
|
||||
|
||||
uint64_t GetCounter() {
|
||||
return g_timer.GetTicks();
|
||||
}
|
||||
|
||||
uint64_t GetFrequency() {
|
||||
return g_timer.GetFrequency();
|
||||
}
|
||||
|
||||
} // namespace Loader::Timer
|
||||
Reference in new issue
Block a user