DataWithTimestamp

data class DataWithTimestamp<T>(val data: T, val timeStamp: Long = System.currentTimeMillis())

Constructors

Link copied to clipboard
constructor(data: T, timeStamp: Long = System.currentTimeMillis())

Properties

Link copied to clipboard
val data: T
Link copied to clipboard

Functions

Link copied to clipboard
fun isExpired(cacheLife: Duration, currentTimeStamp: Long = System.currentTimeMillis()): Boolean