views:

108

answers:

1

I've made a clock, and I'm trying to update it so it displays, well, the time. When I initiate the NSDate it is an instance of the exact current time, for the time it was initiated. So what I have going on here is pinging the updateTime function with an NSTimer to update the clock every 3 seconds.

It seems that there should be a way to do this better? I'm afraid I'm using more resources then necessary by doing this method, and while performance isn't really an issue for a clock, I'd like to get better at my resource management.

+4  A: 

Don't be afraid of NSTimer. A timer that fires once a second (or even less in your case) hardly uses any resources. It's the way to do this.

Ole Begemann