This depends on various factors, but it can take anywhere from 30 minutes to several hours, during which time you won't be able to use your Mac. It is better to keep Mac charged during the process to avoid sudden power failure. If the process is interrupted, you will have to repeat these steps again.