well I was going to say use the Network waterfall in the F12 tools, here is a screenshot of this page. The green line indicates when the render is done and the user can start interacting.
But you want to do it in JavaScript. So that is going to take a little effort but here goes. Go to the console and execute performance.timing. This will give you an object with a lot of timing values. These are tick values and you will need to compare them to get actual millisecond deltas. Here is an example of the output for this page.
{
[functions]: ,
__proto__: { },
connectEnd: 1382671634858,
connectStart: 1382671634858,
constructor: { },
domainLookupEnd: 1382671634858,
domainLookupStart: 1382671634858,
domComplete: 1382671635972,
domContentLoadedEventEnd: 1382671635377,
domContentLoadedEventStart: 1382671635198,
domInteractive: 1382671635198,
domLoading: 1382671634929,
fetchStart: 1382671634858,
loadEventEnd: 1382671635974,
loadEventStart: 1382671635973,
msFirstPaint: 1382671635631,
navigationStart: 1382671634796,
redirectEnd: 0,
redirectStart: 0,
requestStart: 1382671634929,
responseEnd: 1382671634929,
responseStart: 1382671634929,
unloadEventEnd: 1382671634796,
unloadEventStart: 1382671634796
}