tarde

Crates.iotarde
lib.rstarde
version0.2.0
sourcesrc
created_at2019-09-10 15:29:15.723381
updated_at2019-09-11 14:10:59.737172
descriptionTARDE - Time And Rust Duration Ergonomics, a quick way to initalize std::time::Duration values
homepagehttps://github.com/deg4uss3r/tarde
repositoryhttps://github.com/deg4uss3r/tarde
max_upload_size
id163849
size21,486
Ricky Hosfelt (deg4uss3r)

documentation

README

TARDE

license Crates.io

Linux: Build Status

Windows: Build Status

TARDE (tar-dee, Time And Rust Duration Ergonomics) is a small library to allow for better ergonomics when using std::time::Duration.

Example

use std::time::Instant;
use tarde::{During, Error};

fn main() -> Result<(), tarde::Error> {
    let now = time::Instant::now();
    thread::sleep(10.millis()?); 

    Ok(assert!(now.elapsed() >= 10.millis()?))
}
Commit count: 27

cargo fmt