function startAutoSave(){

    autosave_interval = setInterval(saveSOD, 5 * 60 * 1000); // autosave all 5 minutes
}
Autosave mode is activated when the user has the write lock. The Current state will be saved to the storage file every 5 minutes.