(String id, String cooldownName)
| 34 | } |
| 35 | |
| 36 | public static int getTimeLeft(String id, String cooldownName) { |
| 37 | CooldownAPI cooldown = getCooldown(id, cooldownName); |
| 38 | int f = -1; |
| 39 | if (cooldown != null) { |
| 40 | long now = System.currentTimeMillis(); |
| 41 | long cooldownTime = cooldown.start; |
| 42 | int totalTime = cooldown.timeInSeconds; |
| 43 | int r = (int) (now - cooldownTime) / 1000; |
| 44 | f = (r - totalTime) * -1; |
| 45 | } |
| 46 | return f; |
| 47 | } |
| 48 | |
| 49 | public static double getTimeLeftDouble(String id, String cooldownName) { |
| 50 | CooldownAPI cooldown = getCooldown(id, cooldownName); |
no test coverage detected