Use runAfter instead of runPeriodically

This commit is contained in:
chimp1984 2020-10-04 12:54:27 -05:00
parent 3b31dc9ff3
commit 0cc0cfc9a5
No known key found for this signature in database
GPG key ID: 9801B4EC591F90E3

View file

@ -264,7 +264,7 @@ public class PersistenceManager<T extends PersistableEnvelope> {
// We write to disk with a delay to avoid frequent write operations. Depending on the priority those delays
// can be rather long.
if (timer == null) {
timer = UserThread.runPeriodically(() -> {
timer = UserThread.runAfter(() -> {
persistNow(null);
UserThread.execute(() -> timer = null);
}, source.delayInSec, TimeUnit.SECONDS);