Session duration can be measured with the Usage Over Time chart. The Session Duration metric shows the median time from the start of a session until the last recorded event (e.g., pageview, click, or touch). For detailed guidance, see Usage over time overview.
For more advanced analysis, such as calculating total time on site, you can use Heap Connect (paid feature) to export data into an external warehouse and run custom queries. For more information and examples of what you can do (including time on site), see our list of Heap Connect: Common Queries.