This assignment can be moved to outside the loop (e.g. around L104), since it only needs to be done once. Or did you mean to increase it by 5 seconds every time?