Esiste la funzione sleep() che attende un determinato tempo.