It depends on how long they walk away for...
If they come back within the session timeout (30 mins) and open a new page, then the time spent will be the timestamp of Page B minus the timestamp of Page A.
However, if the user left for more than 30 mins, a new session will be started, and Page A will have no time spend associated to it. (Single Page Views and Last Page Views within a session have no timestamp with which to calculate the time spent)