mirror of
https://github.com/tmux-plugins/tmux-cpu.git
synced 2026-09-10 07:16:16 -04:00
Replace commas with dots in uptime output to avoid ending up with truncated floats
This commit is contained in:
parent
29738fe778
commit
b8ac9cac6b
|
|
@ -28,6 +28,9 @@ print_load() {
|
|||
sub(/,$/, "", $(NF-2));
|
||||
sub(/,$/, "", $(NF-1));
|
||||
sub(/,$/, "", $NF);
|
||||
sub(/,/, ".", $(NF-2));
|
||||
sub(/,/, ".", $(NF-1));
|
||||
sub(/,/, ".", $(NF));
|
||||
printf "%.2f %.2f %.2f", $(NF-2)/num_cores, $(NF-1)/num_cores, $NF/num_cores
|
||||
}')
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue