Re: To run a block of code at every 1 second

2009-03-03 Thread Charles Srstka
On Mar 3, 2009, at 11:17 AM, Nick Rogers wrote: Hi, Here's the code: the following method is running in a separate thread: - (void)myFucntion { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; for (;;)// for loop starts here and is very quick, 100s of iterations per seco

Re: To run a block of code at every 1 second

2009-03-03 Thread Joar Wingfors
On Mar 3, 2009, at 9:17 AM, Nick Rogers wrote: Hi, Here's the code: the following method is running in a separate thread: - (void)myFucntion { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; for (;;)// for loop starts here and is very quick, 100s of iterations per seco

To run a block of code at every 1 second

2009-03-03 Thread Stuart Malin
On Mar 3, 2009, at 7:24 AM, cocoa-dev-requ...@lists.apple.com wrote: the following method is running in a separate thread: - (void)myFucntion { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; for (;;)// for loop starts here and is very quick, 100s of iterations per

Re: To run a block of code at every 1 second

2009-03-03 Thread Michael Vannorsdel
Make the main thread method something like this: - (void)myThreadStart { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(myFucntion) userInfo:nil repeats:YES]; [[NSRunLoop currentRunLoop] run]; /

Re: To run a block of code at every 1 second

2009-03-03 Thread Thomas Davie
On 3 Mar 2009, at 18:17, Nick Rogers wrote: Hi, Here's the code: the following method is running in a separate thread: - (void)myFucntion { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; for (;;)// for loop starts here and is very quick, 100s of iterations per second

To run a block of code at every 1 second

2009-03-03 Thread Nick Rogers
Hi, Here's the code: the following method is running in a separate thread: - (void)myFucntion { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; for (;;)// for loop starts here and is very quick, 100s of iterations per second { {