backport builds
[dosdemo] / src / dos / audos.c
index 513bf89..6b7709a 100644 (file)
@@ -4,6 +4,7 @@
 #include <ctype.h>
 #include "audio.h"
 #include "midasdll.h"
+#include "util.h"
 
 #define SET_MUS_VOL(vol) \
        do { \
@@ -209,3 +210,13 @@ unsigned long get_msec(void)
 {
        return ticks * tick_interval;
 }
+
+void sleep_msec(unsigned long msec)
+{
+       unsigned long wakeup_time = ticks + msec / tick_interval;
+       while(ticks < wakeup_time) {
+#ifdef USE_HLT
+               halt();
+#endif
+       }
+}