Sleep part has no errors indeed !
So it's indeed the time between endoperations and startoperations that can only be done in steps of 100ms by some reason.
Wild guess: Something to do with events ? ^^
Anyways I wish you goodluck with it !
It seems pretty dangerous for people (like me) that use their own attacker scripts since those delays are very small.
Could be your computer is slowTry opening them first after that log them in. (and lower your fps maybe)