If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
How costsly would it be to have an NSTimer that fires once every 0.5 to 1.0 seconds? Upon firing it just checks the status of a few things, it won't be cause running through huge arrays or anything. Any comments?
How costsly would it be to have an NSTimer that fires once every 0.5 to 1.0 seconds? Upon firing it just checks the status of a few things, it won't be cause running through huge arrays or anything. Any comments?
Kind Regards,
Ian
I can't think of a substantially less-costly way. NSTimer seems to just be a thin Cocoa shim over some CFRunloop stuff, which seems to be a thin shim over the mach calls.
I use NSTimer for exactly what you described and don't consider it to be costly at all.
Geekspiff - generating spiffdiddlee software since before you began paying attention.