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