What does wait1MSec(1000);

This function doesn’t seem to be the same as the sleep function because it stops motors after the wait is over. So what does the function do exactly

wait1Msec will not stop motors. sleep and wait1Msec do exactly the same thing, perhaps post the code you are trying to use and we may be able to help.