This is an automated email from the ASF dual-hosted git repository.
adelbene pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/wicket.git
The following commit(s) were added to refs/heads/master by this push:
new 874b7ce WICKET-6662 fix to put Task into sleep mode if the frequency
period is not passed yet
874b7ce is described below
commit 874b7ce6598f8a5a19ed9bb26365f84057e92955
Author: Andrea Del Bene <[email protected]>
AuthorDate: Sat May 18 19:53:38 2019 +0200
WICKET-6662 fix to put Task into sleep mode if the frequency
period is not passed yet
---
wicket-util/src/main/java/org/apache/wicket/util/thread/Task.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/wicket-util/src/main/java/org/apache/wicket/util/thread/Task.java
b/wicket-util/src/main/java/org/apache/wicket/util/thread/Task.java
index 319f3be..577ad20 100755
--- a/wicket-util/src/main/java/org/apache/wicket/util/thread/Task.java
+++ b/wicket-util/src/main/java/org/apache/wicket/util/thread/Task.java
@@ -144,7 +144,7 @@ public final class Task
// already passed)
Instant nextExecution =
startOfPeriod.plus(frequency);
- Duration
timeToNextExecution = Duration.between(nextExecution, Instant.now());
+ Duration
timeToNextExecution = Duration.between(Instant.now(), nextExecution);
if
(!timeToNextExecution.isNegative())
{