durr 2.0.0

5.minutes() instead of Duration::from_seconds(300)
Documentation
  • Coverage
  • 0%
    0 out of 8 items documented0 out of 7 items with examples
  • Size
  • Source code size: 2.24 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.13 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • Homepage
  • bmisiak/durr
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • bmisiak

Purpose

A simple helper trait for writing durations in a human-readable way.

~30 lines of code, zero dependencies, zero unsafe, zero macros.

200.nanoseconds()  == Duration::from_nanos(100)
100.milliseconds() == Duration::from_millis(100)
10.seconds()       == Duration::from_secs(10)
5.minutes()        == Duration::from_secs(5*60)
2.hours()          == Duration::from_secs(2*3600)