AndroidAPS/app/src/main/java/info/nightscout/androidaps/utils/Profiler.kt
2020-04-25 17:20:12 +02:00

15 lines
477 B
Kotlin

package info.nightscout.androidaps.utils
import info.nightscout.androidaps.logging.AAPSLogger
import info.nightscout.androidaps.logging.LTag
import javax.inject.Inject
import javax.inject.Singleton
@Singleton
class Profiler @Inject constructor(val aapsLogger: AAPSLogger) {
fun log(lTag: LTag, function: String, start: Long) {
val msec = System.currentTimeMillis() - start
aapsLogger.debug(lTag, ">>> $function <<< executed in $msec miliseconds")
}
}