Skip to content

Commit

Permalink
Merge branch 'beta' into backend/systemtimeerror
Browse files Browse the repository at this point in the history
  • Loading branch information
j10a1n15 authored Oct 1, 2024
2 parents bdbde75 + e304c8f commit 761d383
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -639,20 +639,20 @@ object ComposterOverlay {
add("currentOrganicMatterItem: $currentOrganicMatterItem")
add("currentFuelItem: $currentFuelItem")

println(" ")
add(" ")
val composterUpgrades = ComposterAPI.composterUpgrades
if (composterUpgrades == null) {
println("composterUpgrades is null")
add("composterUpgrades is null")
} else {
for ((a, b) in composterUpgrades) {
println("upgrade $a: $b")
add("upgrade $a: $b")
}
}

println(" ")
add(" ")
val tabListData = ComposterAPI.tabListData
for ((a, b) in tabListData) {
println("tabListData $a: $b")
add("tabListData $a: $b")
}
}
}
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/at/hannibal2/skyhanni/utils/TimeUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ object TimeUtils {

val largestNonZeroUnit = parts.firstNotNullOfOrNull { if (it.value != 0) it.key else null } ?: TimeUnit.SECOND

if (absoluteValue < 1.seconds) {
val formattedMillis = (millis / 100).toInt()
return "0.${formattedMillis}s"
}

var currentUnits = 0
val result = buildString {
for ((unit, value) in parts) {
Expand Down

0 comments on commit 761d383

Please sign in to comment.