How can I 'pause' the game for a few seconds (Unix-Solaris) ?

Is there a way to ‘pause’ a game, say for 3 seconds with a simple function call, on Unix (Solaris) ?

Thank you,
Luke

How about just stop updating your game data? Bonus points for rendering a PAUSED logo as well.

Yes, this is what I want to do (“stop updating the game data”) but I don’t know how to pause the game for specific amount of time, e.g. 2 seconds.
Thank you,
Luke

It depends on your platform. Look for clock, time, delay, etc. functions in your related manpages.

You can try the well named sleep function.

unsigned int sleep (unsigned int seconds) Function
The sleep function waits for seconds or until a signal is delivered, whichever happens first.

If sleep function returns because the requested interval is over, it returns a value of zero. If it returns because of delivery of a signal, its return value is the remaining time in the sleep interval.

The sleep function is declared in unistd.h.
http://www.gnu.org/manual/glibc-2.2.5/html_node/Sleeping.html