diff options
| author | Martin Kagamino Lehoux <martin@lehoux.net> | 2026-04-08 13:26:33 +0200 |
|---|---|---|
| committer | Martin Kagamino Lehoux <martin@lehoux.net> | 2026-04-08 13:26:33 +0200 |
| commit | d7e5728e831f2bc9424227c84be477c554c97aa8 (patch) | |
| tree | c18de092ba6ce5823b775a56977c8e1e69988bb9 /src/std/time.c | |
| parent | cf534d762754860ed5b714974f99acd282d48b3b (diff) | |
Switch from pyright to ty
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'src/std/time.c')
| -rw-r--r-- | src/std/time.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/std/time.c b/src/std/time.c index 331f1d5..7a14f06 100644 --- a/src/std/time.c +++ b/src/std/time.c @@ -6,13 +6,12 @@ Time Time_get() { struct timespec system_time; - assert(clock_gettime(CLOCK_MONOTONIC, &system_time) == 0, "clock_gettime failed"); + assert(clock_gettime(CLOCK_MONOTONIC, &system_time) == 0, + "clock_gettime failed"); return (Time){system_time.tv_sec, system_time.tv_nsec}; } -f32 Time_ms(Time time) { - return time.s * 1e3 + time.ns / 1e6; -} +f32 Time_ms(Time time) { return time.s * 1e3 + time.ns / 1e6; } Duration Time_diff(Time end, Time start) { Duration d; @@ -25,9 +24,7 @@ Duration Time_diff(Time end, Time start) { return d; } -f32 Duration_ms(Duration d) { - return d.s * 1e3 + d.ns / 1e6; -} +f32 Duration_ms(Duration d) { return d.s * 1e3 + d.ns / 1e6; } Duration Duration_from_ms(f32 ms) { Duration d; |
