MiniGames/wwwroot/js/timer.js
// This methode will render the time variable to hour:minute:second format
This methode will render the time variable to hour:minute:second format
This methode will render the time variable to hour : minute : second format
function generateTime() {
        var second = time % 60;
        var minute = Math.floor(time / 60) % 60;
        var hour = Math.floor(time / 3600) % 60;
        second = (second < 10) ? '0' + second : second;
        minute = (minute < 10) ? '0' + minute : minute;
        hour = (hour < 10) ? '0' + hour : hour;
        $('div.timer span.second').html(second);
        $('div.timer span.minute').html(minute);
        $('div.timer span.hour').html(hour);
    }
function generateTime ( ) { var second = time % 60 ; var minute = Math . floor ( time / 60 ) % 60 ; var hour = Math . floor ( time / 3600 ) % 60 ; second = ( second < 10 ) ? '0' + second : second ; minute = ( minute < 10 ) ? '0' + minute : minute ; hour = ( hour < 10 ) ? '0' + hour : hour ; $ ( 'div.timer span.second' ) . html ( second ) ; $ ( 'div.timer span.minute' ) . html ( minute ) ; $ ( 'div.timer span.hour' ) . html ( hour ) ; }
This methode will render the time variable to hour:minute:second format
This methode will render the time variable to hour : minute : second format