Initial commit

This commit is contained in:
Gericom
2025-11-22 17:21:45 +01:00
commit 5d6f67c612
517 changed files with 63025 additions and 0 deletions

26
common/core/TickCounter.h Normal file
View File

@@ -0,0 +1,26 @@
#pragma once
class TickCounter
{
public:
void Start();
void Stop();
u64 GetValue();
static u32 TicksToMilliSeconds(u32 ticks)
{
return ((ticks * 8201887ULL) + (1ULL << 31)) >> 32;
}
static u32 TicksToMicroSeconds(u32 ticks)
{
return (ticks * 4100943703ULL + (1 << 30)) >> 31;
}
private:
u64 _msb = 0;
void TimerOverflowIrq();
};
extern TickCounter gTickCounter;