Expand description
Unit-conversion constants shared workspace-wide.
Every crate that mixes seconds/milliseconds or dollars/micro-dollars must
use these names rather than open-coding the conversion factors — a
misplaced 1_000 vs 1_000_000 was a real class of bug in earlier
rounds of this review.
Constants§
- MS_
PER_ DAY - Milliseconds per day.
- MS_
PER_ HOUR - Milliseconds per hour.
- MS_
PER_ SEC - Milliseconds per second.
- SECS_
PER_ DAY - Seconds per day.
- USD_
MICROS_ PER_ DOLLAR - USD micro-units per dollar. All internal cost bookkeeping stays in
micro-USD (
u64) to keep every arithmetic step in exact integers; only wire-facing serialization converts to floating point.