Fix human readable time string generation
This commit is contained in:
parent
79f5828ef6
commit
6c36a3244f
1 changed files with 2 additions and 2 deletions
|
@ -4,10 +4,10 @@ private val timeStrings = arrayOf("s", "m", "h", "d")
|
|||
private val timeDivs = arrayOf(60, 60, 24)
|
||||
|
||||
fun <T> humanReadableTimeDelta(time: T): String where T : Number {
|
||||
var dbTime = time.toDouble()
|
||||
var dbTime = time.toDouble() / 1000.0
|
||||
var outString = ""
|
||||
|
||||
for (i in 0..(timeDivs.size-1)) {
|
||||
for (i in 0..(timeDivs.size - 1)) {
|
||||
val div = timeDivs[i]
|
||||
val str = timeStrings[i]
|
||||
|
||||
|
|
Loading…
Reference in a new issue