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

akka.util.JavaDurationConverters.scala Maven / Gradle / Ivy

The newest version!
/**
 * Copyright (C) 2009-2016 Lightbend Inc. 
 */
package akka.util
import java.time.{ Duration ⇒ JDuration }
import scala.concurrent.duration.Duration
/**
 * INTERNAL API
 */
private[akka] object JavaDurationConverters {
  final implicit class JavaDurationOps(val self: JDuration) extends AnyVal {
    def asScala: Duration = Duration.fromNanos(self.toNanos)
  }

  final implicit class ScalaDurationOps(val self: Duration) extends AnyVal {
    def asJava: JDuration = JDuration.ofNanos(self.toNanos)
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy