durr

Crates.iodurr
lib.rsdurr
version2.0.0
sourcesrc
created_at2024-06-29 01:41:48.081289
updated_at2024-07-05 21:33:40.775122
description5.minutes() instead of Duration::from_seconds(300)
homepagehttps://lib.rs/durr
repositoryhttps://github.com/bmisiak/durr
max_upload_size
id1287128
size2,601
Brian Misiak (bmisiak)

documentation

README

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)
Commit count: 4

cargo fmt