Time of engagement starts running when a user focuses a tab with page’s content and pauses whenever a tab loses focus. In other words the timer doesn’t run if a user is not looking at the content.
When a user stops scrolling or moving a mouse, a 20 second countdown starts. If during this time the user doesn’t move the mouse or scroll the window, the timer is paused. It resumes counting the time when the user makes an action.