mirror of
https://github.com/openMF/mobile-wallet.git
synced 2026-02-06 09:37:24 +00:00
Fix ci import (#1932)
This commit is contained in:
parent
e76aa77063
commit
6a334c663e
@ -9,9 +9,10 @@
|
||||
*/
|
||||
package template.core.base.analytics
|
||||
|
||||
import kotlinx.datetime.Clock
|
||||
import kotlin.time.Clock
|
||||
import kotlin.time.Duration
|
||||
import kotlin.time.DurationUnit
|
||||
import kotlin.time.ExperimentalTime
|
||||
|
||||
/**
|
||||
* Extension functions for enhanced analytics functionality
|
||||
@ -115,8 +116,10 @@ class TimedEvent internal constructor(
|
||||
private val eventType: String,
|
||||
private val baseParams: List<Param>,
|
||||
) {
|
||||
@OptIn(ExperimentalTime::class)
|
||||
private val startTime = Clock.System.now().toEpochMilliseconds()
|
||||
|
||||
@OptIn(ExperimentalTime::class)
|
||||
fun complete(additionalParams: Map<String, String> = emptyMap()) {
|
||||
val duration = Clock.System.now().toEpochMilliseconds() - startTime
|
||||
val params = baseParams +
|
||||
@ -137,6 +140,7 @@ fun AnalyticsHelper.startTiming(eventType: String, vararg params: Pair<String, S
|
||||
/**
|
||||
* Time a block of code execution
|
||||
*/
|
||||
@OptIn(ExperimentalTime::class)
|
||||
inline fun <T> AnalyticsHelper.timeExecution(
|
||||
eventType: String,
|
||||
vararg params: Pair<String, String>,
|
||||
|
||||
@ -9,7 +9,8 @@
|
||||
*/
|
||||
package template.core.base.analytics
|
||||
|
||||
import kotlinx.datetime.Clock
|
||||
import kotlin.time.Clock
|
||||
import kotlin.time.ExperimentalTime
|
||||
|
||||
/** Performance tracking utilities for analytics */
|
||||
|
||||
@ -262,6 +263,7 @@ fun AnalyticsHelper.performanceTracker(
|
||||
/** Create an app lifecycle tracker */
|
||||
fun AnalyticsHelper.lifecycleTracker(): AppLifecycleTracker = AppLifecycleTracker(this)
|
||||
|
||||
@OptIn(ExperimentalTime::class)
|
||||
private val currentTime = Clock.System.now().toEpochMilliseconds()
|
||||
|
||||
/** Quick performance timing for suspend functions */
|
||||
|
||||
Loading…
Reference in New Issue
Block a user