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(programID()); if (!isMD5(newMD5)) ret; S localMD5 = md5(loadCachedTranspilation(programID())); if (neq(localMD5, newMD5)) { restart(); sleep(); } } finally { autoRestart_schedule(); } }