https://github.com/deg4uss3r/tarde
Time And Rust Duration Ergonomics
https://github.com/deg4uss3r/tarde
duration ergonomics rust time wrapper
Last synced: 3 months ago
JSON representation
Time And Rust Duration Ergonomics
- Host: GitHub
- URL: https://github.com/deg4uss3r/tarde
- Owner: deg4uss3r
- License: mit
- Created: 2019-09-10T15:17:23.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-11-14T23:14:12.000Z (over 5 years ago)
- Last Synced: 2025-01-26T04:25:39.109Z (4 months ago)
- Topics: duration, ergonomics, rust, time, wrapper
- Language: Rust
- Homepage:
- Size: 36.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# TARDE
[](https://github.com/deg4uss3r/tarde/blob/master/LICENSE.md)
[](https://crates.io/crates/tarde)Linux: [](https://travis-ci.org/deg4uss3r/tarde)
Windows: [](https://ci.appveyor.com/project/deg4uss3r/tarde/branch/master)
TARDE (tar-dee, Time And Rust Duration Ergonomics) is a small library to allow for better ergonomics when using `std::time::Duration`.
## Example
```rust
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()?))
}
```