Build AsminVoicechat / prepare-release (push) Successful in 14s
Build AsminVoicechat / build-and-test (17) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (18) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (19) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (20) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (21) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (22) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (23) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (24) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (25) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (26) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (27-ea) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (16) (push) Canceled after 38s
23 lines
615 B
Java
23 lines
615 B
Java
/*
|
|
* Decompiled with CFR 0.152.
|
|
*/
|
|
package de.maxhenkel.voicechat.debug;
|
|
|
|
import java.util.concurrent.ConcurrentHashMap;
|
|
|
|
public class CooldownTimer {
|
|
private static ConcurrentHashMap<String, Long> cooldowns = new ConcurrentHashMap();
|
|
|
|
public static void run(String id, long time, Runnable runnable) {
|
|
if (System.currentTimeMillis() - cooldowns.getOrDefault(id, 0L) > time) {
|
|
cooldowns.put(id, System.currentTimeMillis());
|
|
runnable.run();
|
|
}
|
|
}
|
|
|
|
public static void run(String id, Runnable runnable) {
|
|
CooldownTimer.run(id, 10000L, runnable);
|
|
}
|
|
}
|
|
|