title: Perform action before given interval in setInterval has passed
body: <p>is there an option to check whether user performed an action during the interval? For example, I have elements which highlight randomly one by one with the interval 1000ms. And I should click on the active element during the interval. How to check whether I was successful ?</p>