MCPcopy Create free account
hub / github.com/MenoData/Time4J / fixed

Method fixed

base/src/test/java/net/time4j/clock/ClockTest.java:26–35  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

24public class ClockTest {
25
26 @Test
27 public void fixed() throws InterruptedException {
28 Moment m = SystemClock.INSTANCE.currentTime();
29 TimeSource<Moment> clock = FixedClock.of(m);
30 assertThat(clock.currentTime(), is(m));
31 assertThat(clock.currentInstant(), is(m.toTemporalAccessor()));
32
33 Thread.sleep(1000);
34 assertThat(clock.currentTime(), is(m));
35 }
36
37 @Test
38 public void offsetOneMinute() {

Callers 6

clockToTime4JMethod · 0.45
clockFromTime4JMethod · 0.45
displayMidnightMethod · 0.45
displayMorningMethod · 0.45
displayNoonMethod · 0.45
displayAfternoonMethod · 0.45

Calls 4

ofMethod · 0.95
toTemporalAccessorMethod · 0.95
currentInstantMethod · 0.80
currentTimeMethod · 0.65

Tested by

no test coverage detected