summaryrefslogtreecommitdiff
path: root/lib_m68k/time.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib_m68k/time.c')
-rw-r--r--lib_m68k/time.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/lib_m68k/time.c b/lib_m68k/time.c
index 0b85411..6f73ba9 100644
--- a/lib_m68k/time.c
+++ b/lib_m68k/time.c
@@ -171,3 +171,24 @@ void wait_ticks (unsigned long ticks)
while (get_timer (0) < ticks);
}
#endif
+
+
+/*
+ * This function is derived from PowerPC code (read timebase as long long).
+ * On M68K it just returns the timer value.
+ */
+unsigned long long get_ticks(void)
+{
+ return get_timer(0);
+}
+
+/*
+ * This function is derived from PowerPC code (timebase clock frequency).
+ * On M68K it returns the number of timer ticks per second.
+ */
+ulong get_tbclk (void)
+{
+ ulong tbclk;
+ tbclk = CFG_HZ;
+ return tbclk;
+}