MCPcopy Index your code
hub / github.com/SeleniumHQ/selenium / TickingClock

Class TickingClock

java/test/org/openqa/selenium/support/ui/TickingClock.java:25–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23import java.time.ZoneId;
24
25public class TickingClock extends Clock implements Sleeper {
26
27 private long now = 17;
28
29 public long now() {
30 return now;
31 }
32
33 @Override
34 public void sleep(Duration duration) {
35 now += duration.toMillis();
36 }
37
38 @Override
39 public ZoneId getZone() {
40 return ZoneId.systemDefault();
41 }
42
43 @Override
44 public Clock withZone(ZoneId zone) {
45 return this;
46 }
47
48 @Override
49 public Instant instant() {
50 return Instant.ofEpochMilli(now);
51 }
52}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected