mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-21 19:48:29 +00:00
Fix job deletion bug, add performance tests.
This commit is contained in:
committed by
Nicholas Tinsley
parent
86cf8200b5
commit
36dface175
@@ -8,7 +8,6 @@ package org.signal.core.util
|
||||
import org.signal.core.util.logging.Log
|
||||
import kotlin.time.Duration.Companion.nanoseconds
|
||||
import kotlin.time.DurationUnit
|
||||
import kotlin.time.ExperimentalTime
|
||||
import kotlin.time.measureTimedValue
|
||||
|
||||
/**
|
||||
@@ -83,7 +82,6 @@ class Stopwatch @JvmOverloads constructor(private val title: String, private val
|
||||
/**
|
||||
* Logs how long it takes to perform the operation.
|
||||
*/
|
||||
@OptIn(ExperimentalTime::class)
|
||||
inline fun <T> logTime(tag: String, label: String, decimalPlaces: Int = 0, block: () -> T): T {
|
||||
val result = measureTimedValue(block)
|
||||
Log.d(tag, "$label: ${result.duration.toDouble(DurationUnit.MILLISECONDS).roundedString(decimalPlaces)}")
|
||||
|
||||
Reference in New Issue
Block a user