Commit f5436f06 authored by System Administrator's avatar System Administrator

Fix time display with big values

parent ce5627f4
......@@ -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