Date.now()
Date.now() returns current time in the millisecond.
<!DOCTYPE html>
<html>
<head>
<title>Example</title>
<script type="text/javascript">
var start = Date.now();
document.writeln(start);
</script>
</head>
<body>
</body>
</html>
+ sign converts Date value to millisecond.
<!DOCTYPE html>
<html>
<head>
<title>Example</title>
<script type="text/javascript">
var stop = + new Date();
document.writeln(stop);
</script>
</head>
<body>
</body>
</html>