If you want to do something (including sleep) in N seconds, you can set-up a timer for N seconds, and when the timer elapses perform that action.