Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
os.timer() and application being paused — Gideros Forum

os.timer() and application being paused

kamcknigkamcknig Member
edited October 2012 in General questions
When an application moves to the background, I read in the docs that Timer events and ENTER_FRAME events aren't called. But does os.timer() still advanced? Example

Game plays for 1 minute, so os.timer() would return 60000. If the game them moves to the background for 1 minute, when it comes back will os.timer() return 120000? Or will it start back where it was?
Tagged:

Comments

  • techdojotechdojo Guru
    Accepted Answer
    If that is the case then you can pick up the time in the Application Event.APPLICATION_SUSPEND and Event.APPLICATION_RESUME events (see the lifecycle example) and then use these values to "reset" your timer calculations
    WhiteTree Games - Home, home on the web, where the bits and bytes they do play!
    #MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
  • yep thats what i did! thanks!
Sign In or Register to comment.