Patyadigg Posted May 24, 2016 Share Posted May 24, 2016 (edited) Hello all, I have a simple timer program that displays time left and progress bar for a set timer. This timer resets once I click on that timed events icon. To have timers persit on app close, I save the timers init value to an ini file, so if the timer app is closed/reopened, the timers will remain at correct position. Everything works except once the PC is restarted, the subsequent timerinit/diff values are not in reference with the timerinit/diff values returned before PC shutdown. Is there a compile option I have set wrong somewhere? Can I seed timers so they are always in reference with each other? Or is this simply a limitation of timerinit and timerdiff? To fix this, I am planning to switch to epoch time, but I would like to learn more about timerinit and what the value it returns is based off of. Edited May 24, 2016 by Patyadigg Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted May 24, 2016 Moderators Share Posted May 24, 2016 @Patyadigg TimerInit and TimerDiff are really just a measurement of elapsed time within the script (think stop watch). When you reboot the computer, you are of course going to lose that handle unless you are writing it out somewhere to a file. Even then, it would be difficult to accurately measure the amount of time the reboot takes. If I understand you correctly (not always a given ) it sounds like _Now() or _NowTime() might be a better tool for your needs. Patyadigg 1 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Patyadigg Posted May 24, 2016 Author Share Posted May 24, 2016 (edited) Yup _NowCalc and _DateDiff will do exactly what I need. Saves me a handle call to get epoch time TY. Edited May 24, 2016 by Patyadigg Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted May 24, 2016 Moderators Share Posted May 24, 2016 Glad to be of help "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now