JSFiddle - React, Tailwind, and code Playground
by mohammadAdil
JavaScript
var enterTime = 0;
var endTime;
var diffTime;
$(document).ready(function (e) {
enterTime = event.timeStamp;
console.log(enterTime);
});
$(window).bind('beforeunload', function (e) {
endTime = event.timeStamp;
diffTime = endTime - enterTime;
console.log(diffTime);
});