execution-time 0.1.2

simple way to measure and display the execution time
Documentation

Execution Time

This Rust project provides a simple way to measure and display the execution time of code blocks. It allows you to start a timer and then print the elapsed time in a human-readable format, including days, hours, minutes, and seconds.

Usage

  1. Add the dependency to your Cargo.toml file:

    [dependencies]
    execution-time = "0.1"
    
  2. Import and Use the library in your main.rs file.

    use execution_time::ExecutionTime;
    
    fn main() {
        let timer = ExecutionTime::start();
    
        // Simulate some work being done
        std::thread::sleep(std::time::Duration::from_millis(1234));
    
        timer.print_elapsed_time();
    }