summaryrefslogtreecommitdiff
path: root/include/nitro/OS_tick_shared.h
diff options
context:
space:
mode:
authorRevo <projectrevotpp@hotmail.com>2020-06-19 23:07:18 -0400
committerGitHub <noreply@github.com>2020-06-19 23:07:18 -0400
commit0c8b5417cee5ff73f9db4b691c7549e82fdc30bd (patch)
treefe0e454b0b267045c891a796040a3b83267724e8 /include/nitro/OS_tick_shared.h
parentb138e415a2c6b4e42a08e776cd482d91d50bbc2a (diff)
parent12c17948602bf14535c91c530f214b99863e038e (diff)
Merge branch 'master' into pikalax_work
Diffstat (limited to 'include/nitro/OS_tick_shared.h')
-rw-r--r--include/nitro/OS_tick_shared.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/include/nitro/OS_tick_shared.h b/include/nitro/OS_tick_shared.h
new file mode 100644
index 00000000..e6d6d3b3
--- /dev/null
+++ b/include/nitro/OS_tick_shared.h
@@ -0,0 +1,24 @@
+/*
+ * NOTE:
+ * This file is shared between ARM9 and ARM7
+ * DO NOT PUT PROC SPECIFIC CODE IN HERE
+ * Thank You!
+ */
+
+/*
+ * DO NOT INCLUDE THIS FILE DIRECTLY
+ * Include OS_tick.h from the specific proc's lib
+ */
+
+#ifndef POKEDIAMOND_OS_TICK_SHARED_H
+#define POKEDIAMOND_OS_TICK_SHARED_H
+
+#include "nitro/types.h"
+
+typedef u64 OSTick;
+
+#define OS_SYSTEM_CLOCK HW_SYSTEM_CLOCK
+
+#define OS_MilliSecondsToTicks(msec) ((OSTick)(((OS_SYSTEM_CLOCK/1000) * (u64)(msec)) / 64))
+
+#endif //POKEDIAMOND_OS_TICK_SHARED_H