The latter gives the exact meaning of 12.5 hours. The plural and singular forms of each unit are declared to be equal or interchangeable. Each is allowed to replace the other. Which one sounds the most appropriate will be written in our formulas and calculations. In responding to questions how much, we have a choice in the units of measurement used.
Quantities come with units.
Numbers come without. A quantity says how much. A number counts or says how many. You may measure weight or mass with kilograms or with pounds. You may measure your savings or investments in dollars and cents, or in your favorite currency.