Skip to content

Commit

Permalink
add a timeout to limit cpu usage from webworker #20
Browse files Browse the repository at this point in the history
  • Loading branch information
jefBinomed committed Oct 16, 2018
1 parent 2d43d08 commit dd74215
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion public/computePositionsWorker.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ function compute(){
})

time++;
setTimeout(compute,0);
setTimeout(compute,10);
}

onmessage = function(e) {
Expand Down

0 comments on commit dd74215

Please sign in to comment.