From 997b25e6598e51defe01b3d1b314370802365248 Mon Sep 17 00:00:00 2001 From: limited_dev Date: Thu, 11 May 2023 08:18:42 +0200 Subject: [PATCH] chore: optimized code to remove warnings Signed-off-by: limited_dev --- src/main/kotlin/de/limited_dev/botendo/util/Logger.kt | 2 +- src/main/kotlin/de/limited_dev/botendo/util/TimeUtil.kt | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/kotlin/de/limited_dev/botendo/util/Logger.kt b/src/main/kotlin/de/limited_dev/botendo/util/Logger.kt index c900635..4e6baf9 100644 --- a/src/main/kotlin/de/limited_dev/botendo/util/Logger.kt +++ b/src/main/kotlin/de/limited_dev/botendo/util/Logger.kt @@ -31,7 +31,7 @@ object Logger { try { println( ("[" + Class.forName(caller.className).simpleName + "." + - caller.methodName + ":" + caller.lineNumber + "] [" + dtf.format(now)).toString() + "] <" + msg + ">" + caller.methodName + ":" + caller.lineNumber + "] [" + dtf.format(now)) + "] <" + msg + ">" ) } catch (e: ClassNotFoundException) { e.printStackTrace() diff --git a/src/main/kotlin/de/limited_dev/botendo/util/TimeUtil.kt b/src/main/kotlin/de/limited_dev/botendo/util/TimeUtil.kt index 5f1132d..2c914dd 100644 --- a/src/main/kotlin/de/limited_dev/botendo/util/TimeUtil.kt +++ b/src/main/kotlin/de/limited_dev/botendo/util/TimeUtil.kt @@ -23,8 +23,8 @@ import java.util.concurrent.TimeUnit object TimeUtil { ///Convert Miliseconds to xdays xhours xmins xsecs - fun getTimeFormatedShortend(time: Long): String { - var time = time + fun getTimeFormatedShortend(timeIn: Long): String { + var time = timeIn val days = TimeUnit.MILLISECONDS .toDays(time) time -= TimeUnit.DAYS.toMillis(days) @@ -55,8 +55,8 @@ object TimeUtil { return s } - fun getTimeFormatedRaw(time: Long): String { - var time = time + fun getTimeFormatedRaw(timeIn: Long): String { + var time = timeIn val days = TimeUnit.MILLISECONDS .toDays(time) time -= TimeUnit.DAYS.toMillis(days)