Jump to content

Timerinit vs Epochtime


Recommended Posts

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 by Patyadigg
Link to comment
Share on other sites

  • Moderators

@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.

"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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...