Crates.io | durr |
lib.rs | durr |
version | 2.0.0 |
source | src |
created_at | 2024-06-29 01:41:48.081289 |
updated_at | 2024-07-05 21:33:40.775122 |
description | 5.minutes() instead of Duration::from_seconds(300) |
homepage | https://lib.rs/durr |
repository | https://github.com/bmisiak/durr |
max_upload_size | |
id | 1287128 |
size | 2,601 |
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)