How to make time depending response

Since my question has a different topic now (the time-depending problem is solved), I have started a new question building up on this post. You can answer either here or there: link to new question