Adding a wait function for lua that takes ms