use better accuracy for average time - #.# often produces just 0

This commit is contained in:
Anton Keks 2016-12-11 19:41:43 +02:00
parent 45b6dd3cdf
commit cb73c55b19

View File

@ -77,7 +77,7 @@ public class StatisticsDialog extends InfoDialog {
double totalSeconds = scanTime/1000;
double totalMinutes = totalSeconds/60;
double totalHours = totalMinutes/60;
NumberFormat format = new DecimalFormat("#.#");
NumberFormat format = new DecimalFormat("#.##");
if (totalHours >= 1)
return format.format(totalHours) + Labels.getLabel("unit.hour");
if (totalMinutes >= 1)