diff options
| author | Dante Niewenhuis <d.niewenhuis@hotmail.com> | 2023-11-15 15:27:18 +0100 |
|---|---|---|
| committer | Dante Niewenhuis <d.niewenhuis@hotmail.com> | 2023-11-15 15:27:18 +0100 |
| commit | 1513efe07605975cd2f86f0b739bd490e4fc9970 (patch) | |
| tree | 41e703d5a129948d445d9957392c632ab3f74872 /opendc-common/src/main/java/org | |
| parent | d823cd1eb16d175fb778c9f6c9282aa16f1a25ff (diff) | |
fixed a problem with the Loggers by copying the data
Diffstat (limited to 'opendc-common/src/main/java/org')
| -rw-r--r-- | opendc-common/src/main/java/org/opendc/common/util/Pacer.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/opendc-common/src/main/java/org/opendc/common/util/Pacer.java b/opendc-common/src/main/java/org/opendc/common/util/Pacer.java index 5b8d8cb0..f3b9a8a7 100644 --- a/opendc-common/src/main/java/org/opendc/common/util/Pacer.java +++ b/opendc-common/src/main/java/org/opendc/common/util/Pacer.java @@ -73,7 +73,7 @@ public final class Pacer { // We assume that the scheduler runs at a fixed slot every time quantum (e.g t=0, t=60, t=120). // We calculate here the delay until the next scheduling slot. - long timeUntilNextSlot = quantumMs - (now % quantumMs); + long timeUntilNextSlot = (quantumMs - (now % quantumMs)) % quantumMs; handle = dispatcher.scheduleCancellable(timeUntilNextSlot, () -> { process.accept(now + timeUntilNextSlot); |
