2 stable releases
1.0.2 | Apr 1, 2023 |
---|---|
1.0.1 | Jan 2, 2023 |
0.1.0 |
|
#16 in #stopwatch
Used in dokkoo
28KB
183 lines
Ticky
Ticky is a stopwatch library, written in Rust.
LICENSE: AGPL-3.0-or-later
lib.rs
:
Ticky
A simple stopwatch implementation.
Example
use ticky::Stopwatch;
let mut sw = Stopwatch::start_new();
// Do something …
sw.stop();
println!("Elapsed time: {}ms", sw.elapsed_ms_whole());
Features
derive_more
- Enables usingderive_more
for derivingFrom
,Into
,Mul
,MulAssign
,Div
,DivAssign
,Rem
,Shr
, andShl
forStopwatch
.hifitime
- Enables usinghifitime
for high-resolution timekeeping.stdtime
- Enables usingstd::time
for timekeeping.
Either hifitime
or stdtime
must be enabled. If neither is enabled, stdtime
is used by default. If both are enabled, hifitime
is used.
Installation
Run cargo add ticky
to add Ticky to your Cargo.toml
file.
License
Ticky is licensed under the GNU Affero General Public License.
Contributing
Contributions are welcome! Please see CONTRIBUTING.md
for more information.
Authors
Acknowledgements
rust-stopwatch
- The inspiration for this crate.
Dependencies
~0–1.7MB
~33K SLoC