• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 package leakcanary.internal
2 
3 import android.os.SystemClock
4 
5 /**
6  * Executes the given [block] and returns elapsed time in milliseconds using [SystemClock.uptimeMillis]
7  */
measureDurationMillisnull8 internal inline fun measureDurationMillis(block: () -> Unit): Long {
9   val start = SystemClock.uptimeMillis()
10   block()
11   return SystemClock.uptimeMillis() - start
12 }
13