Skip to content

Instantly share code, notes, and snippets.

@Homlean
Created June 1, 2012 08:26
Show Gist options
  • Save Homlean/2850310 to your computer and use it in GitHub Desktop.
Save Homlean/2850310 to your computer and use it in GitHub Desktop.
javascript timeDiff
var timeDiff = function(){
var d, time;
return {
setStartTime:function (){
d = new Date();
time = d.getTime();
},
getDiff:function (){
d = new Date();
return (d.getTime()-time);
}
};
}();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment