Block commands and selective continuation of code

I have been trying to perform a vibratory motion with my odrive motor , while it does the job alright i have to introduce sleep timers to allow the hardware to catch up with the code
for i in range(0,10):
…: odrv0.axis0.controller.input_pos=x-0.05
…: time.sleep(0.2)
…: if odrv0.axis0.encoder.pos_estimate>-0.1555 and odrv0.axis0.encoder.pos_estimate<-0.14:
…: print(“y”)
…: odrv0.axis0.controller.input_pos=x+0.05
…: time.sleep(0.1)
for reference i have to manually check whether it has reached a certain position and without the sleep timer my arm would never move and hence never enter the “IF” loop
is there any odrive command which would allow me to directly check if the motor axis has reached a certain index and thus allow me to bypass the sleep delays
PS the time constraint is severe and we must perform the task in about 800-1000 ms which will not be possible when each iteration of the loop potentially consumes 300ms