Change delay function to seconds