Very interesting. I also wanted to test that usleep, it's great reading that it works for you!
And about that strange behaviour... Have you enabled the debug log? All clicks should move a fixed amount of ticks/steps and go to an absolute position. Do you have a backlash value defined?