
com.avsystem.commons.misc.ScalaDurationExtensions.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of commons-core_2.12 Show documentation
Show all versions of commons-core_2.12 Show documentation
AVSystem commons library for Scala
The newest version!
package com.avsystem.commons
package misc
import scala.concurrent.duration.{DoubleMult, DurationDouble, DurationInt, DurationLong, IntMult, LongMult}
/**
* Gathers all extensions from [[scala.concurrent.duration]] into one trait that can be mixed in with package object.
*/
trait ScalaDurationExtensions {
implicit def durationIntOps(n: Int): DurationInt = new DurationInt(n)
implicit def durationLongOps(n: Long): DurationLong = new DurationLong(n)
implicit def durationDoubleOps(d: Double): DurationDouble = new DurationDouble(d)
implicit def durationIntMulOps(i: Int): IntMult = new IntMult(i)
implicit def durationLongMulOps(i: Long): LongMult = new LongMult(i)
implicit def durationDoubleMulOps(d: Double): DoubleMult = new DoubleMult(d)
}
object ScalaDurationExtensions extends ScalaDurationExtensions
© 2015 - 2025 Weber Informatics LLC | Privacy Policy