All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.io.nacular.measured.units2.Time.kt Maven / Gradle / Ivy

There is a newer version: 0.4.1
Show newest version
//package io.nacular.measured.units2
//
///**
// * Units to measure time durations.
// */
//open class Time(suffix: String, ratio: Double = 1.0): Units(suffix, ratio) {
//    operator fun div(other: Time) = toBase() / other.toBase()
//
//    companion object {
//        val milliseconds = Time("ms"                        )
//        val seconds      = Time("s",   1000.0               )
//        val minutes      = Time("min", 60 * seconds.toBase())
//        val hours        = Time("hr",  60 * minutes.toBase())
//    }
//}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy