From 211a429499720d90e232fc31f9bbb0a5f8800d9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B4=AA=E7=B1=BD=E9=98=B3=E5=A4=96=E5=A9=86?= <2915414902@qq.com> Date: Sat, 19 Oct 2024 20:22:33 +0800 Subject: [PATCH] JustAwait --- repo/js/JustAwait/main.js | 6 ++++++ repo/js/JustAwait/manifest.json | 13 +++++++++++++ repo/js/JustAwait/settings.json | 7 +++++++ 3 files changed, 26 insertions(+) create mode 100644 repo/js/JustAwait/main.js create mode 100644 repo/js/JustAwait/manifest.json create mode 100644 repo/js/JustAwait/settings.json diff --git a/repo/js/JustAwait/main.js b/repo/js/JustAwait/main.js new file mode 100644 index 00000000..a92e4938 --- /dev/null +++ b/repo/js/JustAwait/main.js @@ -0,0 +1,6 @@ +(async function () { + // settings 的对象内容来自于 settings.json 文件生成的动态配置页面 + log.info('等待{time}秒', settings.t) + timeset=1000*settings.t + await sleep(timeset); +})(); \ No newline at end of file diff --git a/repo/js/JustAwait/manifest.json b/repo/js/JustAwait/manifest.json new file mode 100644 index 00000000..001c4929 --- /dev/null +++ b/repo/js/JustAwait/manifest.json @@ -0,0 +1,13 @@ +{ + "manifest_version": 1, + "name": "只是等待一下", + "version": "1.0", + "description": "只用于等待,方便在调度器为不同性能的设备配置等待", + "authors": [ + { + "name": "HZYgrandma", + } + ], + "settings_ui": "settings.json", + "main": "main.js" +} \ No newline at end of file diff --git a/repo/js/JustAwait/settings.json b/repo/js/JustAwait/settings.json new file mode 100644 index 00000000..d46d7eae --- /dev/null +++ b/repo/js/JustAwait/settings.json @@ -0,0 +1,7 @@ +[ + { + "name": "t", + "type": "input-text", + "label": "等待时间(单位:秒)" + } +] \ No newline at end of file