mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-23 05:12:39 +02:00
arm/counter.h: add armGetSystemTickFreq
This commit is contained in:
parent
68a77ac950
commit
ce23a139f4
@ -16,3 +16,13 @@ static inline u64 armGetSystemTick(void) {
|
|||||||
__asm__ __volatile__ ("mrs %x[data], cntpct_el0" : [data] "=r" (ret));
|
__asm__ __volatile__ ("mrs %x[data], cntpct_el0" : [data] "=r" (ret));
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Gets the system counter-timer frequency
|
||||||
|
* @return The system counter-timer frequency, in Hz.
|
||||||
|
*/
|
||||||
|
static inline u64 armGetSystemTickFreq(void) {
|
||||||
|
u64 ret;
|
||||||
|
__asm__ ("mrs %x[data], cntfrq_el0" : [data] "=r" (ret));
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user