Actually, use this... it uses minutes or seconds as appropriate, and rounds the number if it's decimal:
code:
var ThirtyMins = 1800000;
var SixtyMins = 3600000;
var FiveMins = 300000;
var TenMins = 600000;
// SET THE TIME YOU WANT TO USE HERE!
var mytime = ThirtyMins;
function OnEvent_Initialize(bMessengerStart){
if(!bMessengerStart){ OnEvent_SigninReady(Messenger.MyEmail); }
}
function OnEvent_SigninReady(sEmail){
var contacts = Messenger.MyContacts;
var online = 0;
var offline = 0;
for(var e = new Enumerator(contacts); !e.atEnd(); e.moveNext()){
item = e.item();
if(item.Status != 1 && item.Status != 0){ online++; } else { offline++; }
}
MsgPlus.DisplayToastContact('Contact Counter', '[c=green]Online: '+online+'[/c]'+'[c=red]Offline: '+offline+'[/c]','Next count in '+TimeLength(mytime));
MsgPlus.AddTimer('reload', mytime) //Repalce with SixtyMins if you want an hour
}
function OnEvent_Timer(sTimerId){
if (sTimerId == 'reload'){
OnEvent_SigninReady(Messenger.MyEmail); //Simply call the function so you dont duplicate code
}
}
function TimeLength(time){
if(time >= 60000){ return Math.round(time/60000)+" minutes"; }
else{ return Math.round(time/1000)+" seconds"; }
}