• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Performance and NSTimee
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Performance and NSTimee


  • Subject: Re: Performance and NSTimee
  • From: email@hidden
  • Date: Fri, 8 Feb 2002 12:52:13 -0800

I have written an app that needs to refresh itself every second. But the
problem is that it uses 10% or more from the processor. How can I make
sure my app uses less processing time and still keeps updating itself
every second?

This is how my code looks like:

timer = [NSTimer scheduledTimerWithTimeInterval:1 target:self
selector:@selector(refresh:) userInfo:0 repeats:YES];

I don't think NSTimer has anything to do with your CPU usage. I think you need to look at what your code does when refresh: is called. And then you need to optimize it. :-> Try using Sampler.app. Good luck.

Ben Haller
Stick Software
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: How to keep a subview centered - autoresizing
  • Next by Date: Re: TableView refresh
  • Previous by thread: Performance and NSTimee
  • Next by thread: Two ?'s: Default code for NSView & FileMerge problem
  • Index(es):
    • Date
    • Thread