Skip to content

Latest commit

 

History

History
25 lines (16 loc) · 896 Bytes

README.md

File metadata and controls

25 lines (16 loc) · 896 Bytes

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()?))
}