There is a PageLoad.PageTiming.ForegroundDuration which logs the duration of time spent in milliseconds on the page. But since PageLoad is not a repeated field, it only logs the time spent from the load of the page until the page is backgrounded or closed.
If we changed this to a repeated field, and updated the collection code, we could log all time spent when the page was in the foreground, no matter whether it was originally loaded in the foreground or background, and no matter how many times it switched from foreground to background.
Comment 1 by sullivan@chromium.org
, Jan 14