Crates.io | eta |
lib.rs | eta |
version | 0.2.2 |
source | src |
created_at | 2021-08-18 05:55:29.979943 |
updated_at | 2022-08-20 17:07:22.721721 |
description | Tracks progress on repetive tasks and measures estimated remaining times. |
homepage | |
repository | https://github.com/aaarkid/eta |
max_upload_size | |
id | 438820 |
size | 194,360 |
Rust library for tracking progress on repetive tasks and measuring estimated remaining times.
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
ETA aims to be a simple, easy to use, and efficient library for tracking progress on repetitive tasks. The main purpose of ETA is to measure remaining time, but it's being develop to include progress tracking and progress bar display too.
Add this to your Cargo.toml
:
[dependencies]
eta = "0.2.2"
Add this to your source code:
use eta::{ETA, TimeAcc};
Usage is revolved around the Eta
Object which implements a number of functions.
Initialize Eta in two ways:
new(TasksCount, TimeAccuracy)
function where TasksCount
is the number of tasks you want to track and TimeAccuracy
is the accuracy of the time measurement.in_progress(TasksCount, TasksDone, TimeAccuracy)
function where TasksDone
is the number of tasks that have completed.TimeAccuracy
can be one of the following:
TimeAcc::SEC
TimeAcc::MILLI
TimeAcc::MICRO
TimeAcc::NANO
Run step()
function on every iteration of your task.
let mut eta = Eta::new(10, TimeSteps::MILLI);
for i in 0..10 {
do_some_function();
eta.step();
}
For more examples, please refer to the Documentation
See the open issues for a full list of proposed features (and known issues).
Contributing to this repository is greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
Giving the project a star is much appreciated and means a lot! Thanks again!
git checkout -b feature/AmazingFeature
)git commit -m 'Add some AmazingFeature'
)git push origin feature/AmazingFeature
)Distributed under the MPL-2.0 license. See LICENSE.MD
for more information.