add sleep function

(sleep time-in-second)