aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils/interval_utils.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/interval_utils.ts')
-rw-r--r--src/utils/interval_utils.ts20
1 files changed, 0 insertions, 20 deletions
diff --git a/src/utils/interval_utils.ts b/src/utils/interval_utils.ts
deleted file mode 100644
index 62b79f2f5..000000000
--- a/src/utils/interval_utils.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import * as _ from 'lodash';
-
-export const intervalUtils = {
- setAsyncExcludingInterval(fn: () => Promise<void>, intervalMs: number) {
- let locked = false;
- const intervalId = setInterval(async () => {
- if (locked) {
- return;
- } else {
- locked = true;
- await fn();
- locked = false;
- }
- }, intervalMs);
- return intervalId;
- },
- clearAsyncExcludingInterval(intervalId: NodeJS.Timer): void {
- clearInterval(intervalId);
- },
-};