#stopwatch #default #derive-more #hifitime #stdtime

no-std ticky

A stopwatch library, written in Rust

2 stable releases

1.0.2 Apr 1, 2023
1.0.1 Jan 2, 2023
0.1.0 Dec 27, 2022

#11 in #stopwatch

Download history 27/week @ 2023-12-11 34/week @ 2023-12-18 36/week @ 2023-12-25 48/week @ 2024-01-01 50/week @ 2024-01-08 31/week @ 2024-01-15 47/week @ 2024-01-22 29/week @ 2024-01-29 49/week @ 2024-02-05 55/week @ 2024-02-12 39/week @ 2024-02-19 81/week @ 2024-02-26 44/week @ 2024-03-04 64/week @ 2024-03-11 10/week @ 2024-03-18 40/week @ 2024-03-25

177 downloads per month
Used in dokkoo

AGPL-3.0-or-later

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 using derive_more for deriving From, Into, Mul, MulAssign, Div, DivAssign, Rem, Shr, and Shl for Stopwatch.
  • hifitime - Enables using hifitime for high-resolution timekeeping.
  • stdtime - Enables using std::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

Dependencies

~0–1.7MB
~33K SLoC