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

Method nowTime

base/src/test/java/net/time4j/SystemClockTest.java:107–114  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

105 }
106
107 @Test
108 public void nowTime() {
109 PlainTime now = SystemClock.inLocalView().now().toTime();
110 PlainTime expected = PlainTime.nowInSystemTime();
111 assertThat(
112 now.minus(1, ClockUnit.NANOS).isBefore(expected) && now.plus(2, ClockUnit.MILLIS).isAfter(expected),
113 is(true));
114 }
115
116 @Test
117 public void nowMoment() {

Callers

nothing calls this directly

Calls 8

inLocalViewMethod · 0.95
nowInSystemTimeMethod · 0.95
minusMethod · 0.95
plusMethod · 0.95
isBeforeMethod · 0.65
isAfterMethod · 0.65
toTimeMethod · 0.45
nowMethod · 0.45

Tested by

no test coverage detected