[][src]Function metrical::timer

pub fn timer(name: String) -> Timer

Create a timer to monitor time needed to perform a specific action

Example

use metrical::timer;

pub fn do_task() {
    let timer = timer("Perform long task".to_owned());

    // Perform some task

    // You can drop the timer manually to force the end of the timer.
    drop(timer);
}