I wrote a polling function to check the value of reg_result variable for 120 seconds.
reg_result = 0
while_timeout = time.time() + 120
while reg_result is not "REGISTERED" and time.time() < while_timeout:
reg_result = LeshanObj.validate_reg_time(parameter_1)
Is there any other better way of writing a polling method?
Is it possible by not using a while loop?