Skip to content

Instantly share code, notes, and snippets.

@arschmitz
Created January 3, 2013 21:01
Show Gist options
  • Save arschmitz/4447242 to your computer and use it in GitHub Desktop.
Save arschmitz/4447242 to your computer and use it in GitHub Desktop.
var startTime;
$( document ).bind( "click", function() {
startTime = new Date();
} ).bind( "pageshow", function() {
if ( startTime ) {
console.log( ( new Date() ).getTime() - startTime.getTime() );
}
startTime = undefined;
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment