summaryrefslogtreecommitdiff
path: root/src/mytime.h
diff options
context:
space:
mode:
authorJesper Jensen <jesper@jnsn.dev>2026-02-16 21:43:36 +0100
committerJesper Jensen <jesper@jnsn.dev>2026-02-16 21:43:36 +0100
commitc9e3a4b2816ad23aa201a4f43f357a376947bd49 (patch)
tree042530b79b1e3c7c36872b991850002bec9268a8 /src/mytime.h
INITIAL COMMIT
Diffstat (limited to 'src/mytime.h')
-rw-r--r--src/mytime.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mytime.h b/src/mytime.h
new file mode 100644
index 0000000..48eba06
--- /dev/null
+++ b/src/mytime.h
@@ -0,0 +1,12 @@
+#pragma once
+
+#include <stdint.h>
+#include <time.h>
+
+#define TIME_JOIN(H, M, S) ((H) * 3600 + (M) * 60 + (S))
+#define TIME_AS_FLOAT(T) (((double)T.tv_sec) + ((double)T.tv_nsec / 1000000000.0))
+
+struct timespec get_current_time();
+
+void enable_fake_time();
+void progress_time(uint64_t diff);