2020-09-01 05:37:30 +12:00
|
|
|
use std::time::SystemTime;
|
|
|
|
|
2020-09-02 05:34:39 +12:00
|
|
|
/// Class for common functions used across other class/functions
|
|
|
|
|
2020-09-01 05:37:30 +12:00
|
|
|
pub struct Common();
|
|
|
|
impl Common {
|
|
|
|
pub fn print_time(start_time: SystemTime, end_time: SystemTime, function_name: String) {
|
2020-09-02 03:10:54 +12:00
|
|
|
if false {
|
|
|
|
println!(
|
|
|
|
"Execution of function \"{}\" took {:?}",
|
|
|
|
function_name,
|
|
|
|
end_time.duration_since(start_time).expect("Time cannot go reverse.")
|
|
|
|
);
|
|
|
|
}
|
2020-09-01 05:37:30 +12:00
|
|
|
}
|
|
|
|
}
|