16 __asm__ __volatile__ (
"mrs %x[data], cntpct_el0" : [data]
"=r" (ret));
26 __asm__ (
"mrs %x[data], cntfrq_el0" : [data]
"=r" (ret));
36 return (ns * 12) / 625;
45 return (tick * 625) / 12;
static u64 armGetSystemTickFreq(void)
Gets the system counter-timer frequency.
Definition: counter.h:24
static u64 armNsToTicks(u64 ns)
Converts from nanoseconds to CPU ticks unit.
Definition: counter.h:35
static u64 armGetSystemTick(void)
Gets the current system tick.
Definition: counter.h:14
static u64 armTicksToNs(u64 tick)
Converts from CPU ticks unit to nanoseconds.
Definition: counter.h:44
uint64_t u64
64-bit unsigned integer.
Definition: types.h:22