trait Clock extends AnyRef
A low-level abstraction over time. This class supports querying the absolute time and the monitoring flow of time as well as waiting for future times both synchronously and asynchronously.
- Alphabetic
- By Inheritance
- Clock
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def asyncWait(timeout: FiniteDuration)(implicit ec: ExecutionContext): Future[FiniteDuration]
Returns a future that completes after the specified duration has elapsed or if an error is encountered.
Returns a future that completes after the specified duration has elapsed or if an error is encountered.
- timeout
The amount of time that must pass before the returned future completes.
- ec
The execution context to perform wait operations with.
- abstract def now: FiniteDuration
Returns the amount of time that has passed since 12:00 am January 1 1970 GMT.
- abstract def syncWait(timeout: FiniteDuration): FiniteDuration
Attempts to wait for the specified duration, completing after it has elapsed or if an error is encountered.
Attempts to wait for the specified duration, completing after it has elapsed or if an error is encountered.
- timeout
The amount of time to block the calling thread.
- abstract def tick: FiniteDuration
Returns the amount of time that has passed since an arbitrary point in history.
Returns the amount of time that has passed since an arbitrary point in history. The results of this method are only useful when compared against the result of other invocations of this method.
Concrete 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 clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated