Function time_func

Source
pub fn time_func<F, O>(f: F, fname: &str) -> O
where F: Fn() -> O, O: Clone,
Expand description

Helper function that times and prints the elapsed execution time of F if ran in debug mode.

ยงUsage

use rss2email_lib::*;
let blogs: Vec<Blog> = time_func(|| download_blogs(7), "download_blogs");