| Crates.io | icentral-timer |
| lib.rs | icentral-timer |
| version | 0.1.0 |
| created_at | 2025-04-04 22:26:40.642387+00 |
| updated_at | 2025-04-04 22:26:40.642387+00 |
| description | A Rust crate providing a concise, mutable timer for measuring time intervals with high precision, leveraging RefCell and Instant for seamless concurrency. |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1620856 |
| size | 49,464 |
icentral-timer is a highly efficient Rust-based crate designed to accurately measure the time interval between two events. It leverages the system's high-resolution clock to provide precise timing capabilities, making it ideal for performance-sensitive applications in various domains.
The core component is the Timer struct, encapsulating timing logic with an elegant, minimalistic interface. Utilizing Rust's RefCell and Instant, the Timer ensures both mutability and thread safety, allowing for versatility in concurrent applications.
Duration object.use icentral_timer::Timer;
let mut timer = Timer::default();
timer.start();
// Perform some operations here
let duration = timer.interval();
println!("Elapsed time: {:?}", duration);
Add the following to your Cargo.toml:
[dependencies]
icentral-timer = "0.1.0"
This project is licensed under the MIT License.
This README.md file was generated by an AI model and may not be 100% accurate; however, it should be pretty good.
This crate is in the process of being translated from c++ to rust. Currently, it still needs exhaustive testing. It is likely there currently exist many glitches which need to be fixed before proper usage. This crate is based on the original icentral program developed by Fuad Jamor. Please see the following repository for details: https://github.com/fjamour/icentral.
For progress updates, see the workspacer rust project.