2 releases

0.1.2 Apr 4, 2021
0.1.1 Apr 4, 2021
0.1.0 Jul 21, 2019

#51 in Date and time

Download history 1/week @ 2021-02-20 20/week @ 2021-02-27 36/week @ 2021-03-06 4/week @ 2021-03-13 8/week @ 2021-03-20 22/week @ 2021-03-27 68/week @ 2021-04-03 5/week @ 2021-04-10 12/week @ 2021-04-17 3/week @ 2021-05-01 11/week @ 2021-05-08 37/week @ 2021-05-15 5/week @ 2021-05-22 20/week @ 2021-05-29 3/week @ 2021-06-05

69 downloads per month

MIT license

12KB
251 lines

High resolution stopwatch

build

This library is a simple stopwatch implementation based on std::time::SystemTime. This library can also be found on crates.io.

To use this library you only have to add to your Cargo.toml as a dependency:

[dependencies]
hrsw = "0.1.2"

Example usage

use hrsw::Stopwatch;
let mut stopwatch = Stopwatch::new();
stopwatch.start();
// do something and get the elapsed time
let elapsed = stopwatch.elapsed();
// do something other and get the total elapsed time
stopwatch.stop();
let total_elapsed = stopwatch.elapsed();

Contributing contributions welcome

All kinds of contribution is very welcomed, so please feel free to create an issue, a pull request or ask me anything about the library!

No runtime deps