Maybe a simple question:
I've created an application and I need some help with executing a method every 5 minutes (or so).
My first idea about this was to create a while or for loop and increasing a variable. When the variable is high enough (lets say 10000) I execute the method and reset the timer. I think this will cause a high CPU load and besides that, there must be a nicer way to do this.
I've some experience with threads so I'm think of something with NSThread?
I've created an application and I need some help with executing a method every 5 minutes (or so).
My first idea about this was to create a while or for loop and increasing a variable. When the variable is high enough (lets say 10000) I execute the method and reset the timer. I think this will cause a high CPU load and besides that, there must be a nicer way to do this.
I've some experience with threads so I'm think of something with NSThread?