public class FakeClock extends Clock
| Modifier and Type | Class and Description |
|---|---|
static interface |
FakeClock.TimeListener |
| Constructor and Description |
|---|
FakeClock() |
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(FakeClock.TimeListener listener) |
static FakeClock |
forCurrentTimeMillis(long millis) |
ZoneId |
getZone() |
Instant |
instant() |
void |
removeListener(FakeClock.TimeListener listener) |
void |
tick(long tickMs)
Tick the fake clock the given number of milliseconds.
|
void |
tick(long time,
TimeUnit unit) |
FakeClock |
withZone(ZoneId zoneId) |
equals, fixed, hashCode, millis, offset, system, systemDefaultZone, systemUTC, tick, tickMinutes, tickSecondspublic static FakeClock forCurrentTimeMillis(long millis)
public void tick(long tickMs)
tickMs - Milliseconds to move the clock.public void addListener(@Nonnull FakeClock.TimeListener listener)
public void removeListener(@Nonnull FakeClock.TimeListener listener)
Copyright © 2017. All rights reserved.