TimeUnit

constructor(baseUnit: TimeUnit?, toBaseConverter: (Double) -> Double, fromBaseConverter: (Double) -> Double, unitName: String, unitSymbol: String)(source)


constructor(baseUnit: TimeUnit, baseUnitEquivalent: Double, name: String, symbol: String)(source)

Convenience constructor for defining a derived time unit from a base time unit.

This constructor creates a unit whose magnitude is a fixed multiple of the provided base unit. For example, Minutes is defined relative to Seconds using a multiplier of 60.0.

Parameters

baseUnit

the unit to derive from (typically the base time unit)

baseUnitEquivalent

how many base unit units are equal to one of this unit

name

the human-readable name of the unit

symbol

the short symbol used for the unit