randomized send interval to avoid perfect synchronization

This commit is contained in:
fros4943 2010-01-21 13:04:03 +00:00
parent 26e0bab11a
commit 792770dd6c

View File

@ -81,7 +81,7 @@ udphandler(process_event_t ev, process_data_t data)
uip_udp_packet_send(udpconn, "Sender says Hi!", strlen("Sender says Hi!"));
}
etimer_restart(&udp_periodic_timer);
etimer_set(&udp_periodic_timer, 13*CLOCK_SECOND + random_rand()%(4*CLOCK_SECOND));
return 0;
}
/*---------------------------------------------------------------------------*/