Ticket #17863: timetest.html

File timetest.html, 382 bytes (added by thebuck, 21 months ago)

For me, on hrev56334 x86_64, this crashes it after about 60 calls. Feel free to adjust the for-loop iterations (10 by now).

Line 
1<!DOCTYPE html>
2<html><head><title>regular milliseconds getter</title></head><body>
3Got the milliseconds <span id="cnt">0</span> times now.
4<script>
5var val = 0;
6var cnt = document.getElementById("cnt");
7var d = new Date();
8
9function Increment() {
10 d.getMilliseconds();
11 for(var i=0;i<10;i++);
12 val ++;
13 cnt.innerHTML = val;
14};
15
16setInterval(Increment, 50);
17</script>
18</body></html>