From 6400693197bec1b16c5ec6bb9012fd87be00ee2b Mon Sep 17 00:00:00 2001 From: Barinzaya Date: Thu, 24 Apr 2025 09:17:48 -0400 Subject: [PATCH] Added `tick_add` proc to `core:time`. --- core/time/perf.odin | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/time/perf.odin b/core/time/perf.odin index 784d7acd6..265a20edf 100644 --- a/core/time/perf.odin +++ b/core/time/perf.odin @@ -17,6 +17,13 @@ tick_now :: proc "contextless" () -> Tick { return _tick_now() } +/* +Add duration to a tick. +*/ +tick_add :: proc "contextless" (t: Tick, d: Duration) -> Tick { + return Tick{t._nsec + i64(d)} +} + /* Obtain the difference between ticks. */