Could `Duration` receive methods to directly conve...
# stdlib
d
Could
Duration
receive methods to directly convert to and from its underlying
Long
, similar to `Double`'s
toBits
and
fromBits
? I'd like to avoid boxing and take advantage of AndroidX's primitive collections, but creating a
value class MutableDurationList(private val longs: MutableLongList)
requirese a 1:1 conversion, and converting directly to/from a specific unit is both lossy and inefficient compared to using the stored
Long
.
👍 1