Session length is calculated as time between subscribing to event channel and unsubscribing from event channel. Usually this translates directly into opening app and closing the app, but may differ based on the app logic, for example if the app does not activate event automatically when opened, which delays the start point of user session.