Remember that Yosemite routes have a LOT of elevation gain and it can be quite hot lower down.

A rule of thumb to estimate travel time:

miles traveled x mph + 1 hour for each 1000 feet elevation gain. 2- 2.5 mph is a good rate to use for backpacking on good trails.

For example: 10 miles with 3000 feet elevation gain

10 miles/2 mph + 3 hours extra for elevation gain = 8 hours

You will have maximum daylight (16+ hours) - so not so much of running out of daylight as running out of energy.