I want to submit a PR to allow `AbstractLongTimeSo...
# kontributors
e
I want to submit a PR to allow
AbstractLongTimeSource
(https://github.com/JetBrains/kotlin/blob/c56893d9c2c9be51df78acf98e6b6984b10407c5/libraries/stdlib/src/kotlin/time/TimeSources.kt#L28) &
AbstractDoubleTimeSource
be able to provide
TimeMark
s for _reading_s done outside of the time source. This is useful if you already have some readings you want to convert into time marks to be able to easily do duration calculations or interface with some other system that did those readings already. For example
Copy code
object UptimeMillisSource : AbstractLongTimeSource {
  override fun read() = SystemClock.uptimeMillis()
}
If I already have readings of
SystemClock.uptimeMillis()
from another system, I should be able to call:
Copy code
UptimeMillisSource.[ timeMarkOf | readingOf | readingToTimeMark | convert ](some: Long): TimeMark
Any thoughts or I go ahead & submit a PR?
j
In general, you need a YouTrack issue first
e
Yeah I thought so. I brought this here cos lates contribution guidelines says to start a discussion here. https://youtrack.jetbrains.com/issue/KT-76762