Chronometer
Stopwatch lib for rust. Start, pause, reset and lap like any stopwatch. Nothing special I'm just learning rust.
Getting Started
This crate hasn't been uploaded on cargo yet, so clone this repo and make it work, you're probably better at rust than me. Like any cargo project, it has the default architecture.
Features
Methods
::new
Create a new chronometer.
.start()
Starts the chonometer.
.pause()
Pause the chronometer.
.reset()
Reset everything about the chronometer.
.lap()
Add a new lap to the laps.
.duration() -> std::time::Duration
Gets you the time that the chronometer has computed.
Might find a better name for that one later.
Fields
started: bool
Has the chronometer started yet?
paused: bool
Is the chronometer currently in pause state?
laps: Vec<Duration>
All the durations in which the chronometer has marked a lap.
Example
use ;
use Chronometer;
Getting help
I don't think anyone would ever want to use this crate but if you do and you find bug, before internally insulting me, please fill an issue or send me a message on twitter.
License
Love and potatoes, nowlow 🙌