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

Method subtractFrom

base/src/main/java/net/time4j/MachineTime.java:926–942  ·  view source on GitHub ↗
(T time)

Source from the content-addressed store, hash-verified

924 }
925
926 @SuppressWarnings("unchecked")
927 @Override
928 public <T extends TimePoint<? super U, T>> T subtractFrom(T time) {
929
930 U s, f;
931
932 if (this.scale == POSIX) {
933 s = (U) TimeUnit.SECONDS;
934 f = (U) TimeUnit.NANOSECONDS;
935 } else {
936 s = (U) SI.SECONDS;
937 f = (U) SI.NANOSECONDS;
938 }
939
940 return time.minus(this.seconds, s).minus(this.nanos, f);
941
942 }
943
944 /**
945 * <p>Helps to sum up durations of a stream. </p>

Callers

nothing calls this directly

Calls 1

minusMethod · 0.45

Tested by

no test coverage detected