iphone - Stopwatch - NSTimer or NSDate -


i want implement timer counts every second. have 2 ways in mind, kinda confused 1 optimal way it. it's either using nstimer or nsdate, , understand nstimer used fire methods, maybe shouldn't use nstimer nsdate?

some clarification appreciated, thanks.

nsdate model class. doesn't fire or except represent date , time. have use both (nstimer , nsdate) stopwatch. when start watch save current date in nsdate instance , start nstimer 1 sec interval (or more if want display milliseconds). , everytime timer fires, calculate difference between current date , saved date , show user.


Comments

Popular posts from this blog

javascript - backbone.js Collection.add() doesn't `construct` (`initialize`) an object -

php - Get uncommon values from two or more arrays -

Adding duplicate array rows in Php -