handle timeout with timer.is_alive()