Kaynağa Gözat

Added `tick_add` proc to `core:time`.

Barinzaya 4 ay önce
ebeveyn
işleme
6400693197
1 değiştirilmiş dosya ile 7 ekleme ve 0 silme
  1. 7 0
      core/time/perf.odin

+ 7 - 0
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.
 */