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 788593
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T21:23:28+00:00 2026-05-14T21:23:28+00:00

How can I run a clock that allows me to measure the time to

  • 0

How can I run a clock that allows me to measure the time to load until appDidFinishLaunching ?

I want to set a sleep call that extends the Defaul.png show time to 3 seconds regardless the speed of the underlying hardware.

  • 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-05-14T21:23:29+00:00Added an answer on May 14, 2026 at 9:23 pm

    First off, you should know that Springboard in iPhone OS is kinda picky about load times. You should never make a sleep call somewhere in the loading process of you application. If Springboard detects that your application is taking too long to launch, your application will be terminated with “failed to launch in time” in the crash log.

    Secondly, there is no, as far as I know, way of measuring the time your application took to launch. There are several thing happening when the user taps the Application icon on the springboard, and the iPhone OS provides no good information to your application.

    One solution could be to make sure your applicationDidFinishLaunching: is very lightweight, and creating a “fake” Default.png overlay. By trimming down your applicationDidFinishLaunching: method to do only the most essential stuff, and the performing any time consuming tasks in the background, you can ensure that your Default.png overlay is displayed roughly the same time on different hardware.

    - (void)applicationDidFinishLaunching:(UIApplication *)application {
        // Create the image view posing with default.png on top of the application
        UIImageView *defaultPNG = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Default.png"]];
        // Add the image view top-most in the window
        [window addSubview:defaultPNG];
    
        [window makeKeyAndVisible];
    
        // Begin doing the time consuming stuff in the background
        [self performSelectorInBackground:@selector(loadStuff) withObject:nil];
    
        // Remove the default.png after 3 seconds
        [self performSelector:@selector(removeDefaultPNG:) withObject:defaultPNG afterDelay:3.0f];
    }
    
    - (void)removeDefaultPNG:(UIImageView *)defaultPNG {
        // We're now assuming that the application is loaded underneath the defaultPNG overlay
        // This might not be the case, so you can also check here to see if it's ok to remove the overlay
        [defaultPNG removeFromSuperview];
        [defaultPNG release];
    }
    

    If you add more views (your view controllers etc) in the loadStuff method, you should insert them below the defaultPNG overlay. You should also be aware of problems that could occur by doing these things from another thread. You could use performSelectorOnMainThread:withObject:waitUntilDone: if you encounter problems.

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

Sidebar

Related Questions

I want to have horizontal lists that can run as wide as possible but
How can I set up MongoDB so it can run as a Windows service?
Is there a command I can run inside my SQL script so that it
I run a small webpage that allows users to click on various links using
I can run this command in SqlManager to detach the db ALTER DATABASE mydb
I can run RENAME TABLE student TO student_new ; The command is same and
I can run multi-queries with MYSQL v5 with extension PHP :mysqli. But with MYSQL
I can run tasks as part of our functional tests just fine using this
to run a single file you can run in mysql .\ filename or you
OK - I know I can run my java process like this : java

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.