Quick query - do people with good experience of bo...
# server
r
Quick query - do people with good experience of both tend to use java.time or kotlin.time?
d
What do you value? kotlinx is still in alpha.... 🤷
r
Is it? It's in
kotlin.time
not
kotlinx.time
, and annotated as
@WasExperimental
which suggests it isn't any more
d
aha - ok. sorry 🙂 - was thinking it was the external lib
j
I think they have very different use cases -
kotlin.time
is for benchmarks
j
java.time, but that's because I know it. kotlinx one just seemed to have gaps or wrong concepts for me, but maybe it was just different.
r
I think they have very different use cases - kotlin.time is for benchmarks
And detecting timeouts, but yes, I see, and I see the confusion with kotlinx.time which looks much more familiar to a java.time user. Thanks all, helped me learn.
👍 1
c
kotlin.time
is for benchmarks
No, it's for logging events and timeouts. kotlinx-benchmark is for benchmarks
t
I've been using kotlin.time.Duration when declaring a duration such as
5.seconds
and then converting to a java duration when necessary. The main reason is I think the api for declaring the duration is a lot cleaner and more readable.