fn measure_time<T, F>(block: F) -> (time::Duration, T)
where
    F: Fn() -> T,
{
    let start_time = time::OffsetDateTime::now_utc();
    let res = block();
    let finish_time = time::OffsetDateTime::now_utc();

    (finish_time - start_time, res)
}
/// Measures how long a block takes to complete, and returns that time.
Measures how long a block takes to complete, and returns that time.
Measures how long a block takes to complete and returns that time .
fn measure_time<T, F>(block: F) -> (time::Duration, T)
where
    F: Fn() -> T,
{
    let start_time = time::OffsetDateTime::now_utc();
    let res = block();
    let finish_time = time::OffsetDateTime::now_utc();
    (finish_time - start_time, res)
}
fn measure_time < T , F > ( block : F ) -> ( time :: Duration , T ) where F : Fn ( ) -> T , { let start_time = time :: OffsetDateTime :: now_utc ( ) ; let res = block ( ) ; let finish_time = time :: OffsetDateTime :: now_utc ( ) ; ( finish_time - start_time , res ) }
Measures how long a block takes to complete, and returns that time.
Measures how long a block takes to complete and returns that time .
block
F