Why do you think it should go into the while loop?
What are the values of pos and t? (These will be displayed in the Autos window.)