diff options
author | Kimapr <kimapr@mail.ru> | 2023-12-20 14:51:37 +0500 |
---|---|---|
committer | Lizzy Fleckenstein <lizzy@vlhl.dev> | 2023-12-21 22:54:34 +0100 |
commit | 2834bff2cf6131202a788b59a5fd81994e1ed5aa (patch) | |
tree | 9a1ace6488e16d15af474cd027f2387c91ebbc12 /stage3/clock.h | |
parent | 43a856b5d40ceb570af7755d9f1222093a48aa64 (diff) | |
download | cuddles-2834bff2cf6131202a788b59a5fd81994e1ed5aa.tar.xz |
rtc clock driver
Diffstat (limited to 'stage3/clock.h')
-rw-r--r-- | stage3/clock.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/stage3/clock.h b/stage3/clock.h new file mode 100644 index 0000000..f0255bc --- /dev/null +++ b/stage3/clock.h @@ -0,0 +1,18 @@ +#ifndef CLOCK_H +#define CLOCK_H + +#include "def.h" + +#define NANOSECONDS 1000000000 +#define RTC_FREQ 1024 +#define RTC_RATE NANOSECONDS/RTC_FREQ + +extern u64 monoclock_rtc_time; + +void clock_init(); + +u64 clock_cycles(); +u64 clock_monotonic_coarse(); +u64 clock_monotonic(); + +#endif |