com.google.common.testing
Class FakeTicker
java.lang.Object
com.google.common.base.Ticker
com.google.common.testing.FakeTicker
@Beta
@GwtCompatible
public class FakeTicker
- extends Ticker
A Ticker whose value can be advanced programmatically in test.
This class is thread-safe.
- Since:
- 10.0
- Author:
- Jige Yu
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FakeTicker
public FakeTicker()
advance
public FakeTicker advance(long time,
TimeUnit timeUnit)
- Advances the ticker value by
time
in timeUnit
.
advance
public FakeTicker advance(long nanoseconds)
- Advances the ticker value by
nanoseconds
.
read
public long read()
- Specified by:
read
in class Ticker
Copyright © 2010-2012. All Rights Reserved.