Skip to content

Commit b4530f1

Browse files
committed
reduce time units scale convert
1 parent 30a40ab commit b4530f1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

actor/src/main/scala/org/apache/pekko/actor/LightArrayRevolverScheduler.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ class LightArrayRevolverScheduler(config: Config, log: LoggingAdapter, threadFac
196196
}
197197

198198
private def checkPeriod(delay: FiniteDuration): Unit =
199-
if (delay.toNanos <= 0)
199+
if (delay.length <= 0)
200200
throw new IllegalArgumentException(
201201
s"Task scheduled with [${delay.toSeconds}] seconds delay, which means creating an infinite loop. " +
202202
s"The expected delay must be greater than 0.")

0 commit comments

Comments
 (0)