repositories
/
e-mobility-charging-stations-simulator.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
chore: version 1.2.11
[e-mobility-charging-stations-simulator.git]
/
src
/
worker
/
WorkerUtils.ts
diff --git
a/src/worker/WorkerUtils.ts
b/src/worker/WorkerUtils.ts
index 2b6123514633799c668060ff755e4d7a645394a7..7c72ff3e57fcac90ed51150f7780727a754df808 100644
(file)
--- a/
src/worker/WorkerUtils.ts
+++ b/
src/worker/WorkerUtils.ts
@@
-5,6
+5,10
@@
export class WorkerUtils {
// This is intentional
}
// This is intentional
}
+ public static async sleep(milliSeconds: number): Promise<NodeJS.Timeout> {
+ return new Promise((resolve) => setTimeout(resolve as () => void, milliSeconds));
+ }
+
public static defaultExitHandler = (code: number): void => {
if (code !== 0) {
console.error(chalk.red(`Worker exited with error exit code: ${code.toString()}`));
public static defaultExitHandler = (code: number): void => {
if (code !== 0) {
console.error(chalk.red(`Worker exited with error exit code: ${code.toString()}`));