0% found this document useful (0 votes)
17 views1 page

2

This document contains code for a function that converts seconds to a human readable time format of hours, minutes, and seconds. It also contains code for a function that increments a round counter, calls other functions, and prints the current round number.

Uploaded by

Sree Prosanto
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views1 page

2

This document contains code for a function that converts seconds to a human readable time format of hours, minutes, and seconds. It also contains code for a function that increments a round counter, calls other functions, and prints the current round number.

Uploaded by

Sree Prosanto
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

function realtime(time){

var sec_num =parseInt(time, 10); // don-t forget the second param


var hours = Math.floor(sec_num / 3600);
var minutes = Math.floor((sec_num - (hours * 3600)) /60);
var seconds = sec_num - (hours * 3600) - (minutes * 60);
if (hours!= 0) {hours = hours+' Hour ';} else{hours = '';}

if (minutes!=0) {minutes = minutes+'Minutes';}


else{minutes = '';}

if (seconds < 10) {seconds = seconds;}


var time = 'Time played = '+hours+minutes+seconds+'Seconds';
return time;
}
function roundnumb(){
console.clear();
if( round == autorounds)
{
stopGame()
}
else
{
round = round + 1;
timeRemaining();
beginingBal();
rewardsBal();
lotteryBal();
console.log('Round #' + round + '/'+autorounds);
}

You might also like