newbie to java here
i got days added in and found it simple enough
however i'm lost with adding centiseconds. i'm assuming of course that i would need to make centiseconds the new standard time in the code instead of seconds.
i read somewhere that java keeps track of time in milliseconds naturally. if this is true, would it be as easy as just simply revealing it in a specified place (for example; after seconds, obviously)
Code:
function SetCountdownText(seconds) {
//store:
_currentSeconds = seconds;
//get minutes:
var minutes=parseInt(seconds/60);
//shrink:
seconds = (seconds%60);
//get hours:
var hours=parseInt(minutes/60);
//shrink:
minutes = (minutes%60);
//get days:
var days=parseInt(hours/24);
//shrink:
hours = (hours%24);
//build text:
var strText = AddZero(days) + ":" + AddZero(hours) + ":" + AddZero(minutes) + ":" + AddZero(seconds);
EDIT: i figured out a way. i changed
window.setTimeout("CountDownTick()", 1000);
to
window.setTimeout("CountDownTick()", 1);
in both instances. then changed seconds, minutes, days, accordingly. seconds are now centiseconds, minutes are now seconds, and so on. putting in the time now is 3600 for 1 minute which kinda blows. if anyone knows of a more "correct" way of doing this, i would still appreciate it.