summaryrefslogtreecommitdiff
path: root/core/timer.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/timer.h')
-rw-r--r--core/timer.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/core/timer.h b/core/timer.h
new file mode 100644
index 0000000..8778831
--- /dev/null
+++ b/core/timer.h
@@ -0,0 +1,14 @@
+// file : core/timer.h
+// project : Salis-VM
+// author : Paul Oliver <contact@pauloliver.dev>
+
+#pragma once
+
+struct Timer {
+ uint64_t step_start;
+ struct timespec time_start;
+ float steps_per_sec;
+};
+
+void timer_reset(struct Timer *timer);
+void timer_measure(struct Timer *timer);