public void setLogTimeout(Duration logTimeout) {
        // Cancel any existing task because the timeout has changed
        if (saveQueuedPacketsTask != null) {
            saveQueuedPacketsTask.cancel();
        }
        // Create a new task and schedule it with the new timeout
        saveQueuedPacketsTask = new SaveQueuedPacketsTask();
        TaskEngine.getInstance().schedule(saveQueuedPacketsTask, logTimeout, logTimeout);

    }
Timer to save queued logs to the XML file.
xmppserver/src/main/java/org/jivesoftware/openfire/audit/spi/AuditorImpl.java