Real-time presence works based on periodic heartbeat requests coming from the user. The user sends those heartbeats every 30 seconds and is marked as offline when we haven't had a heartbeat in 2 minutes. Even at the lowest levels we don't always immediately detect the loss of connection as soon as the user closes the browser - it still often takes the absence of some sort of heartbeat traffic after a timeout interval to declare that the connection has dropped. Users navigating from page to page would flash on and offline constantly if we could reliably detect connections dropping and didn't smooth things out a little.
How does the user list update in real time?
Real-time user presence will update the green dot shown next to a user or lead's profile picture:
When your user list automatically refreshes, it doesn't bring in new people, it just refreshes the online status (the green dot) of who is already there. You will need to manually refresh to bring in new users, or update other values.