aboutsummaryrefslogtreecommitdiff
path: root/src/frontend/util/worker.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/frontend/util/worker.js')
-rw-r--r--src/frontend/util/worker.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/frontend/util/worker.js b/src/frontend/util/worker.js
new file mode 100644
index 0000000..addb2b5
--- /dev/null
+++ b/src/frontend/util/worker.js
@@ -0,0 +1,6 @@
+onmessage = function(e)
+{
+ if(e.data.work === "sleep") {
+ setTimeout(() => { postMessage("done") }, e.data.time);
+ }
+} \ No newline at end of file