mirror of
https://github.com/odin-lang/Odin.git
synced 2026-01-04 12:07:45 +00:00
Added diff() to core:time.
This commit is contained in:
@@ -41,6 +41,10 @@ Weekday :: enum int {
|
||||
Saturday,
|
||||
}
|
||||
|
||||
diff :: proc(start, end: Time) -> Duration {
|
||||
d := end._nsec - start._nsec;
|
||||
return Duration(d);
|
||||
}
|
||||
|
||||
duration_nanoseconds :: proc(d: Duration) -> i64 {
|
||||
return i64(d);
|
||||
|
||||
Reference in New Issue
Block a user