Merge pull request #5074 from Barinzaya/time-tick-add
Add `tick_add` proc to `core:time`
This commit is contained in:
1 file changed
+7
@@ -17,6 +17,13 @@ tick_now :: proc "contextless" () -> Tick {
|
|||||||
return _tick_now()
|
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.
|
Obtain the difference between ticks.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in new issue
Block a user