case class ManualTicker(nanos: AtomicLong = new AtomicLong(0), autoIncrementStepNanos: Long = 0) extends Ticker with Product with Serializable
A Ticker implementation that can be incremented manually for testing purpose
This implementation is similar to FakeTicker in Guava: https://github.com/google/guava/blob/master/guava-testlib/src/com/google/common/testing/FakeTicker.java
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- ManualTicker
- Serializable
- Serializable
- Product
- Equals
- Ticker
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- All
Instance Constructors
- new ManualTicker(nanos: AtomicLong = new AtomicLong(0), autoIncrementStepNanos: Long = 0)
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
-
def
advance(nanoseconds: Long): ManualTicker
Advance the ticker for the given nanoseconds
-
def
advance(time: Long, unit: TimeUnit): ManualTicker
Advance the ticker for the given amount
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- val autoIncrementStepNanos: Long
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
-
def
currentNanos: Long
- Definition Classes
- ManualTicker → Ticker
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val nanos: AtomicLong
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
withIncrements(time: Long, unit: TimeUnit): ManualTicker
Set the auto-increment step, which will be added after reading a value
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated
- Deprecated