In Kotlin, what will be the appropriate way of converting milliseconds (in Long type) to minutes?
You can use TimeUnit class which can convert different time units:
TimeUnit.MILLISECONDS.toMinutes(milliseconds)
TimeUnit.SECONDS.toMillis(seconds)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With