Arduino UNO skips a cicle while or for!!!!

You've shown the implementation of one function in the library. You haven't shown the declaration of that function in the header file, or how you called that function.

Nor have you shown what the input is, or what the output is.

How can we help you solve the case, seeing only the first 10 minutes of the 2 hour whodunit?