I have a requirement to run a loop for one minute and after that I will return result accordingly. Inside the loop, I will monitor a value of a variable. Outside the loop, I will return result according to the monitored value of the variable at the last instance of the loop(at the end of one minute).
For this, I have to run the loop for exactly one minute. How can I give the minute checking in the condition of the loop?
Otherwise, Is there any listener to check the variable's value continuously for one minute?