super("AutoSave Thread");
setDaemon(true); // so we don't keep the main app alive
model = m;
Methods Summary
public void
run()
while (true) { // entire run method runs forever.
try {
sleep(SECONDS*1000);
} catch (InterruptedException e) {
// do nothing with it
}
if (model.wantAutoSave() && model.hasUnsavedChanges())
model.saveFile(null);
}