You will be in Barcelona in 9 hours and 35 minutes of having taken off from Toronto, depending of the time that you may have to stop at stopovers.