From cf534d762754860ed5b714974f99acd282d48b3b Mon Sep 17 00:00:00 2001 From: Martin Kagamino Lehoux Date: Wed, 8 Apr 2026 13:14:27 +0200 Subject: Restructure into src/{std,json}/ Co-Authored-By: Claude Sonnet 4.6 --- src/std/time.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/std/time.h (limited to 'src/std/time.h') diff --git a/src/std/time.h b/src/std/time.h new file mode 100644 index 0000000..26bbf20 --- /dev/null +++ b/src/std/time.h @@ -0,0 +1,20 @@ +#pragma once + +#include "types.h" + +typedef struct { + u64 s; + u64 ns; +} Time; + +typedef struct { + u64 s; + u64 ns; +} Duration; + +Time Time_get(); +f32 Time_ms(Time time); +Duration Time_diff(Time end, Time start); +f32 Duration_ms(Duration duration); +Duration Duration_from_ms(f32 ms); +Duration Duration_diff(Duration a, Duration b); -- cgit v1.3