Warning: session_start(): open(/var/lib/php/sessions/sess_0p9ndmjmp7ov0nuj20iiags9nk, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
!747
m {
static volatile long beatCount;
static volatile int delay = 1000;
static long booted;
static volatile boolean loud = true;
static int jumpEvery = 10;
// We alternate between two machines as a test.
static S machine1 = "teubizvjbppd";
static S machine2 = "dhtvkmknsjym";
p {
booted = now();
readLocally("beatCount");
makeAndroid3("Heart.");
print("Beat count " + beatCount + ". Beating at 1/" + delay + " ms...");
while (true) {
if (loud)
print("beep!");
++beatCount;
saveLocally("beatCount");
if ((beatCount % jumpEvery) == 0) {
print("Now I should be moved!");
hyperMove(machine1, machine2);
System.exit(0);
}
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;
}
}