Popularity
2.9
Growing
Activity
0.0
Stable
82
4
20
Programming language: Rust
License: MIT License
Tags:
Development Tools
Profiling
rust-stopwatch alternatives and similar packages
Based on the "Profiling" category.
Alternatively, view rust-stopwatch alternatives based on common mentions on social networks and blogs.
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of rust-stopwatch or a related project?
Popular Comparisons
README
rust-stopwatch
This is a simple module used to time things in Rust.
Usage
To use, add the following line to Cargo.toml
under [dependencies]
:
stopwatch = "0.0.7"
or alternatively,
stopwatch = { git = "https://github.com/ellisonch/rust-stopwatch.git" }
Example
extern crate stopwatch;
use stopwatch::{Stopwatch};
// ...
let sw = Stopwatch::start_new();
// do something that takes some time
println!("Thing took {}ms", sw.elapsed_ms());
Methods
fn new() -> Stopwatch
fn start_new() -> Stopwatch
fn start(&mut self)
fn stop(&mut self)
fn reset(&mut self)
fn restart(&mut self)
fn is_running(&self) -> bool
fn elapsed(&self) -> Duration
fn elapsed_ms(&self) -> i64