Polish variable name in ReschedulingRunnable

As a variable name, `initDelay` is applicable for `scheduleAtFixedRate`
and `scheduleWithFixedDelay` but not for `schedule`.

Closes gh-30762
This commit is contained in:
Yanming Zhou 2023-06-28 10:10:53 +08:00 committed by Sam Brannen
parent c95426a616
commit d8729a7c67
1 changed files with 2 additions and 2 deletions

View File

@ -79,8 +79,8 @@ class ReschedulingRunnable extends DelegatingErrorHandlingRunnable implements Sc
if (this.scheduledExecutionTime == null) { if (this.scheduledExecutionTime == null) {
return null; return null;
} }
Duration initialDelay = Duration.between(this.triggerContext.getClock().instant(), this.scheduledExecutionTime); Duration delay = Duration.between(this.triggerContext.getClock().instant(), this.scheduledExecutionTime);
this.currentFuture = this.executor.schedule(this, initialDelay.toNanos(), TimeUnit.NANOSECONDS); this.currentFuture = this.executor.schedule(this, delay.toNanos(), TimeUnit.NANOSECONDS);
return this; return this;
} }
} }