mirror of
https://github.com/BX-Team/DivineMC.git
synced 2026-01-04 15:31:43 +00:00
started rework and first stable build
This commit is contained in:
42
patches/removed/1.19.4/server/0004-Time-Utilities.patch
Normal file
42
patches/removed/1.19.4/server/0004-Time-Utilities.patch
Normal file
@@ -0,0 +1,42 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: YatopiaMC <yatopiamc@gmail.com>
|
||||
Date: Fri, 23 Oct 2020 09:20:01 -0700
|
||||
Subject: [PATCH] Time Utilities
|
||||
|
||||
Original code by YatopiaMC, licensed under MIT
|
||||
You can find the original code on https://github.com/YatopiaMC/Yatopia
|
||||
|
||||
diff --git a/src/main/java/org/yatopiamc/yatopia/server/util/TimeUtils.java b/src/main/java/org/yatopiamc/yatopia/server/util/TimeUtils.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..bb023bcb4b1e1ab5261c83358ce0951cc35ba16d
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/org/yatopiamc/yatopia/server/util/TimeUtils.java
|
||||
@@ -0,0 +1,27 @@
|
||||
+package org.yatopiamc.yatopia.server.util;
|
||||
+
|
||||
+import java.util.concurrent.TimeUnit;
|
||||
+
|
||||
+public class TimeUtils {
|
||||
+
|
||||
+ public static String getFriendlyName(TimeUnit unit) {
|
||||
+ switch (unit) {
|
||||
+ case NANOSECONDS:
|
||||
+ return "ns";
|
||||
+ case MILLISECONDS:
|
||||
+ return "ms";
|
||||
+ case MICROSECONDS:
|
||||
+ return "micros";
|
||||
+ case SECONDS:
|
||||
+ return "s";
|
||||
+ case MINUTES:
|
||||
+ return "m";
|
||||
+ case DAYS:
|
||||
+ return "d";
|
||||
+ case HOURS:
|
||||
+ return "h";
|
||||
+ default:
|
||||
+ throw new AssertionError();
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
\ No newline at end of file
|
||||
Reference in New Issue
Block a user