Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 04-25-2009, 08:16 PM   #1 (permalink)
will.ray
Registered Member
 
Join Date: Mar 2009
Posts: 174
Default proper use of nstimer...

I just want to implement a small delay.. so is it "ok" to do the following?

Code:
[NSTimer scheduledTimerWithTimeInterval:2 target:self selector:@selector(timerUpdate) userInfo:nil repeats:NO];
		
while(!done);  //wait here until timerUpdate sets flag to done..

//continue program..
Ok, basically I am setting up the timer, but all I want is to delay, so I loop until the timerUpdate function sets the 'done' property..

can i loop like that? is that "ok"? thx
will.ray is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 158,688
Threads: 89,160
Posts: 380,406
Top Poster: BrianSlick (7,110)
Welcome to our newest member, mary3chil
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 07:21 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.