mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
Truncate load averages to 2 decimal places
This commit is contained in:
parent
4124ce6679
commit
f3c4657a94
1 changed files with 1 additions and 1 deletions
|
@ -87,7 +87,7 @@ fn print_loadavg() {
|
||||||
else {
|
else {
|
||||||
print!("load average: ")
|
print!("load average: ")
|
||||||
for n in range(0, loads) {
|
for n in range(0, loads) {
|
||||||
print!("{}{}", avg[n], if n == loads - 1 { "\n" }
|
print!("{:.2f}{}", avg[n], if n == loads - 1 { "\n" }
|
||||||
else { ", " } );
|
else { ", " } );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue