!747 m { static volatile long beatCount; static volatile int delay = 1000; static long booted; static volatile boolean loud; p { booted = now(); readLocally("beatCount"); makeAndroid3("Heart."); print("Beating at 1/" + delay + " ms..."); while (true) { if (loud) print("beep!"); ++beatCount; saveLocally("beatCount"); sleep(delay); } } static synchronized S answer(S s, L history) { if (match3("get beat count", s)) return "" + beatCount; if (match3("get delay", s)) return "" + delay; if (match3("booted when", s)) return "" + booted; return null; } }