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