Did you multiply the speed*delta in the function? I think that might help stabilize the frame rate on different machines.
I think it's because I didn't add it