You need to sign in or sign up before continuing.
Commit 23c3cbce authored by System Administrator's avatar System Administrator Committed by Vitaly Lipatov

Fix time display with big values

parent 0199f7b2
......@@ -92,11 +92,11 @@ Timer.prototype.getElapsedSeconds = function(){
// Возвращает отформатированную строку, которую можно выводить на экран
// Не изменяет состояния таймера, лишь считывает текущее значение
Timer.prototype.getFormattedString = function(){
var seconds = this.getElapsedSeconds();
var minutes = Math.floor(seconds/60);
var hours = Math.floor(minutes/60);
var minutes = minutes - hours*60;
var seconds = seconds - minutes*60;
var secondsFull = this.getElapsedSeconds();
var minutesFull = Math.floor(secondsFull/60);
var hours = Math.floor(minutesFull/60);
var minutes = minutesFull - hours*60;
var seconds = secondsFull - minutesFull*60;
if (seconds < 10) {
seconds = "0"+seconds;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment