Module time::duration

source ·
Expand description

The Duration struct and its associated impls.


  • Implement Mul (reflexively) and Div for Duration for various types.
  • item 🔒
    Format the first item that produces a value greater than 1 and then break.
  • item 🔒
    Format a single item.
  • This is adapted from the std implementation, which uses mostly bit operations to ensure the highest precision: Changes from std are marked and explained below.


  • A span of time with nanosecond precision.


  • Padding 🔒
    By explicitly inserting this enum where padding is expected, the compiler is able to better perform niche value optimization.