Use kotlin platform independent time instead of jvm System

This commit is contained in:
Olof Hedman
2025-09-16 13:38:36 +02:00
parent e1832c7744
commit ba93d0ad9d

View File

@@ -8,6 +8,8 @@ import app.klottr.util.distanceMeters
import kotlinx.coroutines.async import kotlinx.coroutines.async
import kotlinx.coroutines.coroutineScope import kotlinx.coroutines.coroutineScope
import kotlin.math.roundToInt import kotlin.math.roundToInt
import kotlin.time.Clock
import kotlin.time.ExperimentalTime
/** Konfiguration för autoscan (toggles + radier). */ /** Konfiguration för autoscan (toggles + radier). */
data class ScanConfig( data class ScanConfig(
@@ -36,7 +38,8 @@ suspend fun scanAndMarkFound(
): Boolean = coroutineScope { ): Boolean = coroutineScope {
updateAwayFlags(lat, lon) updateAwayFlags(lat, lon)
val now = System.currentTimeMillis() @OptIn(ExperimentalTime::class)
val now: Long = Clock.System.now().toEpochMilliseconds()
val wikiDef = async { val wikiDef = async {
if (!config.showWiki) emptyList() if (!config.showWiki) emptyList()