object TimeLimits extends TimeLimits
Companion object that facilitates the importing of Timeouts
members as
an alternative to mixing in the trait. One use case is to import Timeouts
's members so you can use
them in the Scala interpreter.
- Source
- TimeLimits.scala
- Alphabetic
- By Inheritance
- TimeLimits
- TimeLimits
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
cancelAfter[T](timeout: Span)(fun: ⇒ T)(implicit signaler: Signaler, prettifier: Prettifier = implicitly[Prettifier], pos: Position = implicitly[source.Position], timed: Timed[T] = implicitly[Timed[T]]): T
Executes the passed function, enforcing the passed time limit by attempting to signal the operation if the time limit is exceeded, and "canceling" if the time limit has been exceeded after the function completes, where what it means to "cancel" is determined by the implicitly passed
Timed[T]
instance.Executes the passed function, enforcing the passed time limit by attempting to signal the operation if the time limit is exceeded, and "canceling" if the time limit has been exceeded after the function completes, where what it means to "cancel" is determined by the implicitly passed
Timed[T]
instance.The
Timed
companion object offers three implicits, one forFutureOutcome
, one forFuture[U]
and one for any other type. The implicitTimed[FutureOutcome]
defines cancelation as canceling theFutureOutcome
: no exception will be thrown. The implicitTimed[Future[U]]
defines canceling as failing theFuture[U]
with aTestCanceledException
: no exception will be thrown. The implicit for any other type defines failure as throwingTestCanceledException
. For the details, see the Scaladoc of the implicitTimed
providers in theTimed
companion object.- timeout
the maximimum amount of time allowed for the passed operation
- signaler
a strategy for signaling the passed operation
- prettifier
a
Prettifier
for prettifying error messages- pos
the
Position
of the caller site- timed
the
Timed
type class that provides the behavior implementation of the timing restriction.
- Definition Classes
- TimeLimits
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
failAfter[T](timeout: Span)(fun: ⇒ T)(implicit signaler: Signaler, prettifier: Prettifier = implicitly[Prettifier], pos: Position = implicitly[source.Position], timed: Timed[T] = implicitly[Timed[T]]): T
Executes the passed function, enforcing the passed time limit by attempting to signal the operation if the time limit is exceeded, and "failing" if the time limit has been exceeded after the function completes, where what it means to "fail" is determined by the implicitly passed
Timed[T]
instance.Executes the passed function, enforcing the passed time limit by attempting to signal the operation if the time limit is exceeded, and "failing" if the time limit has been exceeded after the function completes, where what it means to "fail" is determined by the implicitly passed
Timed[T]
instance.The
Timed
companion object offers three implicits, one forFutureOutcome
, one forFuture[U]
and one for any other type. The implicitTimed[FutureOutcome]
defines failure as failing theFutureOutcome
with aTestFailedDueToTimeoutException
: no exception will be thrown. The implicitTimed[Future[U]]
defines failure as failing theFuture[U]
with aTestFailedDueToTimeoutException
: no exception will be thrown. The implicit for any other type defines failure as throwingTestFailedDueToTimeoutException
. For the details, see the Scaladoc of the implicitTimed
providers in theTimed
companion object.- timeout
the maximimum amount of time allowed for the passed operation
- fun
the operation on which to enforce the passed timeout
- signaler
a strategy for signaling the passed operation
- prettifier
a
Prettifier
for prettifying error messages- pos
the
Position
of the caller site- timed
the
Timed
type class that provides the behavior implementation of the timing restriction.
- Definition Classes
- TimeLimits
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )