ManualTicker

wvlet.airframe.rx.ManualTicker
case class ManualTicker(nanos: AtomicLong, autoIncrementStepNanos: Long) extends Ticker

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

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Ticker
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Concrete methods

def advance(time: Long, unit: TimeUnit): ManualTicker

Advance the ticker for the given amount

Advance the ticker for the given amount

Attributes

def advance(nanoseconds: Long): ManualTicker

Advance the ticker for the given nanoseconds

Advance the ticker for the given nanoseconds

Attributes

def currentNanos: Long
def withIncrements(time: Long, unit: TimeUnit): ManualTicker

Set the auto-increment step, which will be added after reading a value

Set the auto-increment step, which will be added after reading a value

Attributes

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product