I don't think you really understand what you are doing. At a very rudimentary level, most methods in OSBot you can test because they return as a boolean. Second, you state that after "antiban()" is called your "timer stops completely" but you don't show your "antiban" method.
Finally, your script will not perfectly execute your code in the exact same amount of time every time; and your client will not send packets on a consistent exact latency, and the server will not accept and process your requests exactly the same every single time. Let's say we live in your perfect world where all of that is true (or there is some way to find out), with some middle school statistics we can find your upper and lower bounds along with your mean over the course of your script running.
TLDR: You didn't give us any information, post your "antiban" code and test what your OSBot API methods are returning. Also, you didn't really mention if a stack trace was generated, I'm going to assume not.