diff options
author | phaller <hallerp@gmail.com> | 2012-04-15 17:06:09 +0200 |
---|---|---|
committer | phaller <hallerp@gmail.com> | 2012-04-15 17:06:09 +0200 |
commit | a1c36ea5fcebdad36b77b85310f262e0cd381976 (patch) | |
tree | ded3beb6d04d500bb6506e79a1bcaa81ec0565b3 /src | |
parent | 6ecb8263bff937ac545163260c7a4d4c473d996a (diff) | |
download | scala-a1c36ea5fcebdad36b77b85310f262e0cd381976.tar.gz scala-a1c36ea5fcebdad36b77b85310f262e0cd381976.tar.bz2 scala-a1c36ea5fcebdad36b77b85310f262e0cd381976.zip |
Resolve feature and deprecation warnings in scala.concurrent
Diffstat (limited to 'src')
-rw-r--r-- | src/library/scala/concurrent/ManagedBlocker.scala | 1 | ||||
-rw-r--r-- | src/library/scala/concurrent/util/Duration.scala | 8 | ||||
-rw-r--r-- | src/library/scala/concurrent/util/duration/package.scala | 3 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/library/scala/concurrent/ManagedBlocker.scala b/src/library/scala/concurrent/ManagedBlocker.scala index 0b6d82e76f..9c6f4d51d6 100644 --- a/src/library/scala/concurrent/ManagedBlocker.scala +++ b/src/library/scala/concurrent/ManagedBlocker.scala @@ -12,7 +12,6 @@ package scala.concurrent * * @author Philipp Haller */ -@deprecated("Not used.", "2.10.0") trait ManagedBlocker { /** diff --git a/src/library/scala/concurrent/util/Duration.scala b/src/library/scala/concurrent/util/Duration.scala index 15a546de10..c4e5fa491a 100644 --- a/src/library/scala/concurrent/util/Duration.scala +++ b/src/library/scala/concurrent/util/Duration.scala @@ -297,7 +297,7 @@ class FiniteDuration(val length: Long, val unit: TimeUnit) extends Duration { def toMinutes = unit.toMinutes(length) def toHours = unit.toHours(length) def toDays = unit.toDays(length) - def toUnit(u: TimeUnit) = long2double(toNanos) / NANOSECONDS.convert(1, u) + def toUnit(u: TimeUnit) = toNanos.toDouble / NANOSECONDS.convert(1, u) override def toString = this match { case Duration(1, DAYS) ⇒ "1 day" @@ -341,11 +341,11 @@ class FiniteDuration(val length: Long, val unit: TimeUnit) extends Duration { } } - def *(factor: Double) = fromNanos(long2double(toNanos) * factor) + def *(factor: Double) = fromNanos(toNanos.toDouble * factor) - def /(factor: Double) = fromNanos(long2double(toNanos) / factor) + def /(factor: Double) = fromNanos(toNanos.toDouble / factor) - def /(other: Duration) = if (other.finite_?) long2double(toNanos) / other.toNanos else 0 + def /(other: Duration) = if (other.finite_?) toNanos.toDouble / other.toNanos else 0 def unary_- = Duration(-length, unit) diff --git a/src/library/scala/concurrent/util/duration/package.scala b/src/library/scala/concurrent/util/duration/package.scala index 25625054ee..e3cf229c61 100644 --- a/src/library/scala/concurrent/util/duration/package.scala +++ b/src/library/scala/concurrent/util/duration/package.scala @@ -1,6 +1,7 @@ package scala.concurrent.util import java.util.concurrent.TimeUnit +import language.implicitConversions package object duration { @@ -27,4 +28,4 @@ package object duration { implicit def intMult(i: Int) = new IntMult(i) implicit def longMult(l: Long) = new LongMult(l) implicit def doubleMult(f: Double) = new DoubleMult(f) -}
\ No newline at end of file +} |