Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8384123
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T17:19:50+00:00 2026-06-09T17:19:50+00:00

I have an update method that is called every frame. Each update, it adds

  • 0

I have an update method that is called every frame. Each update, it adds its deltaTime on to a variable.

If I pause CCDirector and after a while I resume it, will the deltaTime in that scheduled method be massive?

I ask because I am tracking down a bug where on some devices the player can press the home button on an iOS device and then after some time resume the app and the variable that holds their totalGameTime has still been added on as if the game hasn’t been paused.

I was under the impression this shouldn’t happen when I use cocos2d schedulers.

The code for anyone who feels they need it

//[self schedule:@selector(myUpdate:)];

float totalGameTime

-(void) myUpdate:(ccTime) dt {

    totalGameTime += (float) dt;
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T17:19:51+00:00Added an answer on June 9, 2026 at 5:19 pm

    I’ve noticed this happen too but only in release. I fixed it by adding:

    [[CCDirector sharedDirector] setNextDeltaTimeZero:YES];
    

    to my -(void) applicationDidBecomeActive:(UIApplication *)application

    This may perhaps be a bug in version 2.0 as I don’t remember this happening prior to this version.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In Ruby on Rails, I have an update method in a controller, that is
I have a method that attempts to update a sql server database in an
I have a database entry that I need to update. This method obviously doesn't
I have a Method name update, this will be called depending on the boolean
I have an object that I need updated data from in every update in
I have a background thread and the thread calls some methods that update the
I have a simple update method in my manager class and I need to
I have a problem with the logic of this code, XNA's Update Method is
currently in my update controller method I have: @group.attributes = { :title => params[:group][:title],
I have update panel that content check box, textbox, 3 DropDownList with CascadingDropDown extender.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.