summaryrefslogtreecommitdiff
path: root/stage3/clock.h
diff options
context:
space:
mode:
Diffstat (limited to 'stage3/clock.h')
-rw-r--r--stage3/clock.h18
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