Skip to content

Commit 12221f9

Browse files
authored
JavaScript timer
1 parent 161627e commit 12221f9

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

js/timer.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
var start = null;
2+
function start(){
3+
start = event.timeStamp;
4+
}
5+
6+
function stop(){
7+
var time = event.timeStamp - start;
8+
alert(time);
9+
}

0 commit comments

Comments
 (0)