Skip to content

Commit 0f072ec

Browse files
committed
Fix rounding for average time
1 parent 5dcc69d commit 0f072ec

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
"name": "Web Activity Time Tracker",
55
"short_name": "Web Time Tracker",
6-
"version": "1.5.1",
6+
"version": "1.5.2",
77
"minimum_chrome_version": "26",
88

99
"description": "Track and limit time your activity in the browser every day.",

src/scripts/webact.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ function setStatData(array) {
376376
stat.firstDay = new Date(array[0]).toLocaleDateString('ru-RU');;
377377
stat.lastDay = new Date(array[array.length - 1]).toLocaleDateString('ru-RU');;
378378
stat.activeDays = array.length;
379-
stat.averageTime = totalTime / array.length;
379+
stat.averageTime = Math.round(totalTime / array.length);
380380
stat.totalDays = daysBetween(array[0], array[array.length - 1]);
381381
}
382382

0 commit comments

Comments
 (0)