13 lines
356 B
Rust
13 lines
356 B
Rust
|
use std::time::SystemTime;
|
||
|
|
||
|
pub struct Common();
|
||
|
impl Common {
|
||
|
pub fn print_time(start_time: SystemTime, end_time: SystemTime, function_name: String) {
|
||
|
println!(
|
||
|
"Execution of function \"{}\" took {:?}",
|
||
|
function_name,
|
||
|
end_time.duration_since(start_time).expect("Time cannot go reverse.")
|
||
|
);
|
||
|
}
|
||
|
}
|