add basic metrics impl
All checks were successful
Deploy App / docker (ubuntu-latest, 2.44.0, 17, 3.8.5) (push) Successful in 2m32s

This commit is contained in:
Lee
2024-04-14 09:34:10 +01:00
parent fc640fe1a0
commit e9da32775f
16 changed files with 346 additions and 9 deletions

View File

@ -0,0 +1,19 @@
package xyz.mcutils.backend.common;
public class Timer {
/**
* Schedules a task to run after a delay.
*
* @param runnable the task to run
* @param delay the delay before the task runs
*/
public static void scheduleRepeating(Runnable runnable, long delay, long period) {
new java.util.Timer().scheduleAtFixedRate(new java.util.TimerTask() {
@Override
public void run() {
runnable.run();
}
}, delay, period);
}
}