main

square/leakcanary

Last updated at: 29/12/2023 09:46

Clock.kt

TLDR

This file contains the definition of the Clock interface, which is used to abstract the SystemClock.uptimeMillis() Android API in non-Android artifacts.

Methods

uptimeMillis

This method returns the current time in milliseconds since the system started.

package leakcanary

/**
 * An interface to abstract the SystemClock.uptimeMillis() Android API in non Android artifacts.
 */
fun interface Clock {
  /**
   * On Android VMs, this should return android.os.SystemClock.uptimeMillis().
   */
  fun uptimeMillis(): Long
}