-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtimer.html
26 lines (26 loc) · 897 Bytes
/
timer.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Timer</title>
<script src="./node_modules/jquery/dist/jquery.min.js"></script>
<script src="./node_modules/easytimer.js/dist/easytimer.min.js"></script>
</head>
<body style="background-color: rgb(53, 54, 58);">
<div id="secondTenthsExample">
<center>
<div class="values" style="font-size: 150px; color: whitesmoke;"></div>
</center>
</div>
</body>
<script type="text/javascript">
var timer = new easytimer.Timer();
timer.start({ precision: 'secondTenths' });
timer.addEventListener('secondTenthsUpdated', function (e) {
$('#secondTenthsExample .values').html(
timer.getTimeValues().toString(['minutes', 'seconds', 'secondTenths'])
);
});
</script>
</html>