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

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

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

def advance(nanoseconds: Long): ManualTicker

Advance the ticker for the given nanoseconds

Advance the ticker for the given nanoseconds

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

Inherited methods

def productElementNames: Iterator[String]
Inherited from:
Product
def productIterator: Iterator[Any]
Inherited from:
Product