Target filter
Search Kotlin docs
  • Platforms
  • Tealium Prism Kotlin
core/com.tealium.prism.core.api.misc/TimeFrameUtils

TimeFrameUtils

object TimeFrameUtils

Utility object for easily creating TimeFrame objects of different lengths and units.

Properties

days
Link copied to clipboard
@JvmStatic
val Int.days: TimeFrame

Returns a TimeFrame representing the number of days given by the integer value

hours
Link copied to clipboard
@JvmStatic
val Int.hours: TimeFrame

Returns a TimeFrame representing the number of hours given by the integer value

microseconds
Link copied to clipboard
@JvmStatic
val Int.microseconds: TimeFrame

Returns a TimeFrame representing the number of microseconds given by the integer value

milliseconds
Link copied to clipboard
@JvmStatic
val Int.milliseconds: TimeFrame

Returns a TimeFrame representing the number of milliseconds given by the integer value

minutes
Link copied to clipboard
@JvmStatic
val Int.minutes: TimeFrame

Returns a TimeFrame representing the number of minutes given by the integer value

nanoseconds
Link copied to clipboard
@JvmStatic
val Int.nanoseconds: TimeFrame

Returns a TimeFrame representing the number of nanoseconds given by the integer value

seconds
Link copied to clipboard
@JvmStatic
val Int.seconds: TimeFrame

Returns a TimeFrame representing the number of seconds given by the integer value

Functions

asUnit
Link copied to clipboard
@JvmStatic
fun TimeFrame.asUnit(unit: TimeUnit): Long

Converts the current TimeFrame to the give unit

inDays
Link copied to clipboard
@JvmStatic
fun TimeFrame.inDays(): Long

Converts the current TimeFrame to days

inHours
Link copied to clipboard
@JvmStatic
fun TimeFrame.inHours(): Long

Converts the current TimeFrame to hours

inMilliseconds
Link copied to clipboard
@JvmStatic
fun TimeFrame.inMilliseconds(): Long

Converts the current TimeFrame to milliseconds

inMinutes
Link copied to clipboard
@JvmStatic
fun TimeFrame.inMinutes(): Long

Converts the current TimeFrame to minutes

inSeconds
Link copied to clipboard
@JvmStatic
fun TimeFrame.inSeconds(): Long

Converts the current TimeFrame to seconds

Generated by Dokka
(c) Tealium 2026