Add sleep function for running in Windows