As I said earlier "use a seperate while loop"!
You can use a local variable to see if the condition applies when the timeout occurs. See attached quick draft.
You really should NOT use equal comparison on floating point values. I change to integers for now.