summaryrefslogtreecommitdiffstats
path: root/system/timer.c
diff options
context:
space:
mode:
authorneoraider <devnull@localhost>2005-04-18 17:18:02 +0200
committerneoraider <devnull@localhost>2005-04-18 17:18:02 +0200
commit2c7f83e006c3fee8d26e940eee801a4be9443e50 (patch)
treecb8273f74857305921b653aed0a0488b2d27c13a /system/timer.c
downloadwinx-master.tar
winx-master.zip
Verzeichnisstruktur ver?ndertHEADmaster
Diffstat (limited to 'system/timer.c')
-rw-r--r--system/timer.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/system/timer.c b/system/timer.c
new file mode 100644
index 0000000..847cfb0
--- /dev/null
+++ b/system/timer.c
@@ -0,0 +1,9 @@
+#include <timer.h>
+#include <system.h>
+
+TIMER timers = {0};
+
+void sleep(unsigned long ms) {
+ timers.time = (ms + 9)/10;
+ while(timers.time) asm("incl %0; decl %0" : "+m" (timers.time));
+}