Kotlin / kotlinx.html

Kotlin DSL for HTML
Apache License 2.0
1.6k stars 130 forks source link

Replace custom time handling with kotlin.time.TimeSource #260

Closed hfhbd closed 6 months ago

hfhbd commented 6 months ago

This is a binary breaking change.

The current implementation of TagConsumer.measureTime uses a custom time implementation. With Kotlin 1.9, TimeSource is finally stable so we can use it instead. This also allows us to use TimedValue.

Another advantage: The standard lib also provides a TimeSource.Monotonic for WASI, so adding WASI support removes the need to implement currentTimeMillis by ourself.