Programming Cocoa to pause between actions

zootbobbalu

Registered
How can you program Cocoa to pause between actions? I wan't to make something move across the screen slow, but I don't know how to make Cocoa pause between redraws.

Any ideas?
 
How about <code>NSThread sleepUntilDate:</code> in Foundation? That would probably be a good place to start.
 
There are also two Unix-level calls you can use: sleep (sleep for a number of seconds) and usleep (sleep for a number of microseconds); do a man 3 sleep or man usleep for info.
 
Back
Top