Add Time_GetTSC code for ARM64

This commit is contained in:
Ali Mashtizadeh 2023-11-07 18:48:48 -05:00
parent 081043f8f1
commit 944a67a596

View File

@ -12,7 +12,17 @@
uint64_t
Time_GetTSC()
{
return 0;
uint64_t ui;
asm volatile("mrs %0, CNTVCT_EL0" : "=&r" (ui));
return ui;
}
uint64_t
Time_GetTSCFreq()
{
uint64_t ui;
asm volatile("mrs %0, CNTFRQ_EL0" : "=&r" (ui));
return ui;
}
static void