Quote:
Originally Posted by quick99si
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 ?