Skip to content

Commit

Permalink
bug when computing nb of days of a game!
Browse files Browse the repository at this point in the history
  • Loading branch information
phyver committed Jun 12, 2021
1 parent cc476a3 commit 882ac4c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bin/stat_raw.awk
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

function human_time(seconds) {
if (seconds >= 24*3600) {
return sprintf("%dd", int(seconds/24*3600))
return sprintf("%.1fd", seconds/(24*3600))
}
hours = int(seconds / 3600);
seconds = seconds % 3600;
Expand Down
2 changes: 1 addition & 1 deletion bin/stat_session.awk
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function _n(sing, plur, nb) {

function human_time(seconds) {
if (seconds >= 24*3600) {
return sprintf("%dd", int(seconds/24*3600))
return sprintf("%.1fd", seconds/(24*3600))
}
hours = int(seconds / 3600);
seconds = seconds % 3600;
Expand Down

0 comments on commit 882ac4c

Please sign in to comment.