Add timer core

This commit is contained in:
Minz committed 2023-11-07 14:19:36 +01:00
1 parent f022dcbba9
commit 7f020dd179
2 files changed
+30

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
module.exports = {
timeout: 1000,
global: true,
name: 'Test timer every 1 sec',
data: {
i: 0
},
async tick(client, timer) {
console.log(`Test timer ticked ${timer.data.i}`);
timer.data.i++;
if(timer.data.i >= 5) {
clearInterval(timer.instance);
}
},
};