fix sleep function call for windows build