Movatterモバイル変換


[0]ホーム

URL:


Scala 3
3.7.4
LearnInstallPlaygroundFind A LibraryCommunityBlog
Scala 3
LearnInstallPlaygroundFind A LibraryCommunityBlog
DocsAPI
Generated with
Copyright (c) 2002-2025, LAMP/EPFL
Copyright (c) 2002-2025, LAMP/EPFL
Scala 3/scala/scala.jdk/scala.jdk.javaapi/DurationConverters

DurationConverters

scala.jdk.javaapi.DurationConverters

This object contains methods that convert between Scala and Java duration types.

The explicit conversion methods defined here are intended to be used in Java code. For Scala code, it is recommended to use the extension methods defined inscala.jdk.DurationConverters.

Attributes

Source
DurationConverters.scala
Graph
Supertypes
classObject
traitMatchable
classAny
Self type

Members list

Value members

Concrete methods

Convert a ScalaFiniteDuration to a Java duration.

Convert a ScalaFiniteDuration to a Java duration. Note that the Scala duration keeps the time unit it was created with, while a Java duration always is a pair of seconds and nanos, so the unit it lost.

Attributes

Source
DurationConverters.scala

Convert a Java duration to a Scala duration.

Convert a Java duration to a Scala duration. If the nanosecond part of the Java duration is zero, the returned duration will have a time unit of seconds. If there is a nanoseconds part, the Scala duration will have a time unit of nanoseconds.

Attributes

Throws

IllegalArgumentExceptionIf the given Java Duration is out of bounds of what can be expressed byscala.concurrent.duration.FiniteDuration.

Source
DurationConverters.scala
In this article
Generated with
Copyright (c) 2002-2025, LAMP/EPFL
Copyright (c) 2002-2025, LAMP/EPFL

[8]ページ先頭

©2009-2025 Movatter.jp