Fix bug in wait_for_ip: ValueError: Unknown format code 'd' for object of type 'float'

(timeout // 60)  is an integer even when timeout is a float.  But (timeout % 60) is a float when timeout is a float, so it cannot be formatted with "...{1:02d}...".format(...).
So I changed it to int(timeout % 60).

Same for duration % 60.