pub fn time_fn<T>(f: impl FnOnce() -> T) -> (T, Duration)
Time a function execution and return the result + duration