Use kotlin platform independent time instead of jvm System
This commit is contained in:
@@ -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()
|
||||||
|
|||||||
Reference in New Issue
Block a user