MCPcopy Index your code
hub / github.com/apache/groovy / getNow

Method getNow

src/main/java/groovy/time/TimeDuration.java:152–163  ·  view source on GitHub ↗

Returns the date obtained by adding this duration to now. @return the computed date

()

Source from the content-addressed store, hash-verified

150 * @return the computed date
151 */
152 @Override
153 public Date getNow() {
154 final Calendar cal = Calendar.getInstance();
155
156 cal.add(Calendar.DAY_OF_YEAR, TimeDuration.this.getDays());
157 cal.add(Calendar.HOUR_OF_DAY, TimeDuration.this.getHours());
158 cal.add(Calendar.MINUTE, TimeDuration.this.getMinutes());
159 cal.add(Calendar.SECOND, TimeDuration.this.getSeconds());
160 cal.add(Calendar.MILLISECOND, TimeDuration.this.getMillis());
161
162 return cal.getTime();
163 }
164 };
165 }
166}

Callers

nothing calls this directly

Calls 7

getMillisMethod · 0.80
getInstanceMethod · 0.65
addMethod · 0.65
getDaysMethod · 0.45
getHoursMethod · 0.45
getMinutesMethod · 0.45
getSecondsMethod · 0.45

Tested by

no test coverage detected