up
This commit is contained in:
parent
ab9ab64bd5
commit
97c8f22bbb
289 changed files with 195 additions and 172 deletions
|
@ -0,0 +1,23 @@
|
|||
|
||||
|
||||
```js run
|
||||
let i = 0;
|
||||
|
||||
let start = Date.now();
|
||||
|
||||
let timer = setInterval(count, 0);
|
||||
|
||||
function count() {
|
||||
|
||||
for(let j = 0; j < 1000000; j++) {
|
||||
i++;
|
||||
}
|
||||
|
||||
if (i == 1000000000) {
|
||||
alert("Done in " + (Date.now() - start) + 'ms');
|
||||
cancelInterval(timer);
|
||||
}
|
||||
|
||||
}
|
||||
```
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue