if (the_pcb)
return;
- epoch = get_rand_32();
+ new_epoch();
the_pcb = udp_new();
if (!the_pcb)
signal_error_by_blinking();
}
+void new_epoch() { epoch = get_rand_32(); }
+
struct tattle_message_wire_format {
u32_t epoch;
u16_t sender;
void send_report_packet(u16_t seq, u32_t ago);
+void new_epoch();
+
#endif
switch (e.type) {
case NEW_BUTTON_PRESS: {
add_press(pp, &(press_t){e.buttonpress.timestamp, seq++, 0});
+ if (seq == 0)
+ new_epoch();
} break;
case RESEND_TIME: {
/* OK, we're awake. Cool. Thanks! (We actually do the sends in the