summaryrefslogtreecommitdiff
path: root/os.h
diff options
context:
space:
mode:
Diffstat (limited to 'os.h')
-rw-r--r--os.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/os.h b/os.h
index 23e94f2..b0be1c2 100644
--- a/os.h
+++ b/os.h
@@ -85,6 +85,11 @@ static double time_get_seconds(void) {
+ (double)t.tv_nsec * 1e-9;
}
+static void time_sleep_ms(double ms) {
+ if (ms <= 0) return;
+ time_sleep_ns((u64)(ms * 1000000));
+}
+
/// sleep for seconds
static void time_sleep_seconds(double s) {
if (s <= 0) return;