https://kotlinlang.org logo
#coroutines
Title
# coroutines
g

groostav

05/16/2018, 8:11 PM
also I think I'm the only one on the planet using
java.time.Duration
, so perhaps a pair of
value: Long, unit: TimeUnit
is better.
m

mkobit

05/16/2018, 8:59 PM
g

groostav

05/17/2018, 1:56 AM
neat, I hope we see more of this. I'm also wondering if kotlin can create one thats #multiplatform, seems like it shouldnt be too hard to use Java.time.duration on JVM and a string similarly formatted on js. One of the reasons I like it so much is that we have a couple user entered timeout fields, and for test data we can use
val <http://Int.ms|Int.ms> get() = Duration.ofMillis(this)
, which makes for neat test data entry in kotlin
a

araqnid

05/17/2018, 8:21 PM
I was trying to write a multiplatform time library so I can write things for java.time and use them in JS
I anticipate it will take a while though
3 Views