The History feature in the new HTC One M8, lets you keep track of details about recent messages, emails, and calls for a certain contact or number. To view call duration on HTC One M8, do as follows:
1. Open the Phone application
2. Swipe to the History tab (If this tab is not available, tap the 3dot icon and add the History tab from the Edit tabs option)
3. Now find the number/contact you'd like to see the Call Duration details
4. Press and hold on the contact/number and tap the View History option
5. Now, under the Call History title, you can see the details about latest calls with that specific contact/number
6. and there, you should see Call Duration for each call separately
Note that, according to some emails from the users, the Call Duration feature in the HTC One M8 has been disabled by some carriers, like Sprint.