Skip to content

Commit

Permalink
Change measurement presentation to use two decimals
Browse files Browse the repository at this point in the history
  • Loading branch information
bofh69 committed Jan 31, 2024
1 parent e7c5078 commit 73472ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ enum GpiPort {
GPI2,
}

#[derive(Clone)]
#[derive(Copy, Clone)]
enum Unit {
Ampere,
MilliAmpere,
Expand Down Expand Up @@ -475,7 +475,7 @@ fn write_result(avg: f64, unit: Unit) {
}
};

println!("{} {}", avg, unit);
println!("{avg:.02} {unit}");
}

fn get_tracer(debug_filename: Option<std::path::PathBuf>) -> Box<dyn Tracer> {
Expand Down

0 comments on commit 73472ba

Please sign in to comment.