Not very long but it can be an agonizing trip if you go via the Oak Creek Canyon Road which is extremely "curvy" and the driver will fell like the trip will never end. If you don't go via that route you have to go back to I-17 and north on that to I-40 and west on that to a Flagstaff exit. Again, it is not far but I do not remember how long it took via either route. My guess is about 1.5 hours via the latter and about an hour via the former.