blob: 94c58fb8c2414aeb34b93a37c116a5da89138091 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
package scala.concurrent.util.duration
import scala.concurrent.util.{ Duration }
/*
* Avoid reflection based invocation by using non-duck type
*/
protected[duration] class IntMult(i: Int) {
def *(d: Duration) = d * i
}
protected[duration] class LongMult(i: Long) {
def *(d: Duration) = d * i
}
protected[duration] class DoubleMult(f: Double) {
def *(d: Duration) = d * f
}
|