Skip to content

Commit

Permalink
ignore values smaller than 0.1s
Browse files Browse the repository at this point in the history
  • Loading branch information
ayasayadi1 committed Apr 30, 2024
1 parent 19e7a62 commit 7828c81
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions frontend/express/public/javascripts/countly/countly.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -4538,8 +4538,12 @@
var resultStrings = [];
for (var i = 0; i < dict.length && resultStrings.length < 3; i++) {
if (dict[i].k === "second") {
//round to 1 decimal
result[dict[i].k] = Math.round(timeLeft / dict[i].v * 10) / 10;
if (timeLeft < 0.1) {
result.second = 0;
}
else {
result.second = Math.round(timeLeft * 10) / 10;
}
}
else {
result[dict[i].k] = Math.floor(timeLeft / dict[i].v);
Expand Down

0 comments on commit 7828c81

Please sign in to comment.