Function rss2email_lib::time_func

source ·
pub fn time_func<F, O>(f: F, fname: &str) -> Owhere
    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");