static double autoRestart_interval = 10; static bool autoRestart_on; static void autoRestart() { if (autoRestart_on) ret; set autoRestart_on; autoRestart_schedule(); } svoid autoRestart_schedule { doLater_daemon(toMS(autoRestart_interval), f autoRestart_check); } svoid autoRestart_check { try { S newMD5 = getServerTranspilationMD5(progID); if (!isMD5(newMD5)) ret; S localMD5 = md5(loadCachedTranspilation(progID)); print("Local MD5: " + localMD5); if (neq(localMD5, newMD5)) { restart(); sleep(); } } finally { autoRestart(); } }