trait
SpanSugar extends AnyRef
Value Members
-
final
def
!=(arg0: AnyRef): Boolean
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
final
def
==(arg0: AnyRef): Boolean
-
final
def
==(arg0: Any): Boolean
-
final
def
asInstanceOf[T0]: T0
-
def
clone(): AnyRef
-
implicit
def
convertDoubleToGrainOfTime(d: Double): FloatingGrainOfTime
-
implicit
def
convertFloatToGrainOfTime(f: Float): FloatingGrainOfTime
-
implicit
def
convertIntToGrainOfTime(i: Int): GrainOfTime
-
implicit
def
convertLongToGrainOfTime(i: Long): GrainOfTime
-
final
def
eq(arg0: AnyRef): Boolean
-
def
equals(arg0: Any): Boolean
-
def
finalize(): Unit
-
final
def
getClass(): Class[_]
-
def
hashCode(): Int
-
final
def
isInstanceOf[T0]: Boolean
-
final
def
ne(arg0: AnyRef): Boolean
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
Inherited from AnyRef
Value Members
-
final
def
!=(arg0: AnyRef): Boolean
-
final
def
##(): Int
-
final
def
==(arg0: AnyRef): Boolean
-
def
clone(): AnyRef
-
final
def
eq(arg0: AnyRef): Boolean
-
def
equals(arg0: Any): Boolean
-
def
finalize(): Unit
-
final
def
getClass(): Class[_]
-
def
hashCode(): Int
-
final
def
ne(arg0: AnyRef): Boolean
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
Inherited from Any
Value Members
-
final
def
!=(arg0: Any): Boolean
-
final
def
==(arg0: Any): Boolean
-
final
def
asInstanceOf[T0]: T0
-
final
def
isInstanceOf[T0]: Boolean
Ungrouped
-
final
def
!=(arg0: AnyRef): Boolean
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
final
def
==(arg0: AnyRef): Boolean
-
final
def
==(arg0: Any): Boolean
-
final
def
asInstanceOf[T0]: T0
-
def
clone(): AnyRef
-
implicit
def
convertDoubleToGrainOfTime(d: Double): FloatingGrainOfTime
-
implicit
def
convertFloatToGrainOfTime(f: Float): FloatingGrainOfTime
-
implicit
def
convertIntToGrainOfTime(i: Int): GrainOfTime
-
implicit
def
convertLongToGrainOfTime(i: Long): GrainOfTime
-
final
def
eq(arg0: AnyRef): Boolean
-
def
equals(arg0: Any): Boolean
-
def
finalize(): Unit
-
final
def
getClass(): Class[_]
-
def
hashCode(): Int
-
final
def
isInstanceOf[T0]: Boolean
-
final
def
ne(arg0: AnyRef): Boolean
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
Trait providing four implicit conversions that allow you to specify spans of time by invoking "units" methods such as
millis
,seconds
, andminutes
onInt
,Long
,Float
, andDouble
.This trait enables you to specify a span of time in a clear, boilerplate-free way when you need to provide an instance of
Span
. This can be used, for example, with thefailAfter
method of traitTimeouts
or thetimeLimit
field of traitTimeLimitedTests
. It can also be used to specify timeouts when using traitsEventually
,Futures
,Waiter
. Here are examples of each unit enabled by this trait:Int
Long
Float
Double
This trait is not the default way to specify
Span
s for two reasons. First, it adds four implicits, which would give the compiler more work to do and may conflict with other implicits the user has in scope. Instead,Span
provides a clear, concise default way to specify time spans that requires no implicits. Here's an example:If you already have implicit conversions in scope that provide a similar syntax sugar for expression time spans, you can use that by providing an implicit conversion from the result of those expressions to
Span
. For example, here's how you might use theDuration
class from Akka: