As rhino said, timers are most likely what you want to use.
If this is a console application, then the sleep()-style delays may be acceptable.
However, most apps these days are GUI applications, and for those you will NOT want to block a process sitting on a sleep() call.
What you'll want to do is set up a timer, and in a timer event handler you perform one pass of your action. When the last pass is done, disable the timer. This allows the GUI event loop to continue processing events, and it keeps your application from appearing to lock up while it's asleep.
If you need better time precision, you can also run the sleep() method in a worker thread. However, you're not going to get time precision better than 10-50ms (potentially much worse) with any normal method. This should be perfectly fine for most uses.
If you need good cumulative time tracking (say you're drawing the hands on a clock), you should get the current system time inside your timer or worker thread and use that number to adjust how long you wait for the next pass. Otherwise, since timers (and sleep()) will be triggered "as soon as possible after the timer/sleep duration is complete", you'll slowly add up these extra delays and it will run slower than you intended. Ex: sleep(1000) may sleep for 1000 ms, or more likely something like 1005, 1015, 1021, etc. Timers will behave similarly.
There are many ways to do timers (Win32, Qt, boost, etc) and an equally large number of ways to manage threading. So, we'd need to know more about what sort of platform you are working with to answer further.