Re: Performance and NSTimee
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.