View Single Post
  #24 (permalink)  
Old 04-12-2011, 11:36 AM
elesbb's Avatar
elesbb
Super genious in training
Offline
Threadstarter
Location: PA
 
Join Date: Jun 2010
Posts: 1,198
Reputation: 1600
elesbb is halfway to VIP status based on repelesbb is halfway to VIP status based on repelesbb is halfway to VIP status based on repelesbb is halfway to VIP status based on repelesbb is halfway to VIP status based on repelesbb is halfway to VIP status based on repelesbb is halfway to VIP status based on repelesbb is halfway to VIP status based on repelesbb is halfway to VIP status based on repelesbb is halfway to VIP status based on repelesbb is halfway to VIP status based on rep
Mentioned: 42 Post(s)
Tagged: 0 Thread(s)
Re: Certain script run at a certain time

Quote:
Originally Posted by quick99si View Post
It's all the same thing lol. I couldn't see it until I tried simplifying it to give the cpu fewer calculations to perform.

Code:
GetTime(varH,varM,varS)
varSecondsUntilMidnight = ((23-varH)*3600) + (59-varM)*60) + (60-varS))
varMidnightUnix = TimeStamp() + varSecondsUntilMidnight
Code:
GetTime(varH,varM,varS)
varSecondsUntilMidnight = 86400 - (varH*3600) - (varM*60) - varS
varMidnightUnix = TimeStamp() + varSecondsUntilMidnight
Code:
GetTime(varH,varM,varS)
varMidnightUnix = TimeStamp() + 86400 - (varH*3600) - (varM*60) - varS
haha ! yes . and make sure if you want midnight , to make it 24 , not 23 , hence , 24 hours in a day . and you can actually use that for any time , say you want it at 10 , then you would use 22 , I kinda like this method too , I really don't think the memory usage is all that high , but if I shut off my phone or restart , the script ends , where your first version , gets saved in the notification queue . and just a random question , does Mort script follow order of operations ?
Reply With Quote