commit b46a11f48c2426808fceb3e1de21e0e6cd1acf80
parent 78cfe2883ee44bc3836528f1daa9453ce94baba6
Author: Byron Torres <b@torresjrjr.com>
Date: Mon, 13 Feb 2023 15:10:11 +0000
time::chrono: rm use math; simplify def
Diffstat:
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/time/chrono/chronology.ha b/time/chrono/chronology.ha
@@ -1,7 +1,6 @@
// License: MPL-2.0
// (c) 2021-2022 Byron Torres <b@torresjrjr.com>
use time;
-use math;
// Invalid [[moment]].
export type invalid = !void;
@@ -145,7 +144,7 @@ fn calc_instant(
sec = d * daysec,
nsec = 0,
};
- i = time::add(i, d: i64 * dayrem);
+ i = time::add(i, d * dayrem);
i = time::add(i, t);
i = time::add(i, -zo);
return i;
@@ -158,4 +157,4 @@ export def EARTH_DAY: time::duration = 86400 * time::SECOND;
export def MARS_SOL_MARTIAN: time::duration = 86400 * time::SECOND;
// The duration of a solar day on Mars, in terrestrial (SI) seconds.
-export def MARS_SOL_TERRESTRIAL: time::duration = (88775.244147 * time::SECOND: f64): time::duration;
+export def MARS_SOL_TERRESTRIAL: time::duration = 88775244147000 * time::NANOSECOND;