Measures the true time the user spends on the page using visibilityjs.
See demo.ts
in the demo
folder.
To run the demo download the repo and run:
yarn
npx webpack
sensible-browser demo/index.html
Note the output on the browser console after 3 and 10 seconds.