Removed usleep and moved the pseudo-random factor to nanosleep's argument.
This commit is contained in:
parent
90c13c2603
commit
34ebd14ec7
1 changed files with 2 additions and 3 deletions
|
@ -30,7 +30,7 @@
|
||||||
*
|
*
|
||||||
* Author: Adam Dunkels <adam@sics.se>
|
* Author: Adam Dunkels <adam@sics.se>
|
||||||
*
|
*
|
||||||
* $Id: ethernode.c,v 1.11 2007/11/27 20:32:08 adamdunkels Exp $
|
* $Id: ethernode.c,v 1.12 2007/11/27 20:45:15 nvt-se Exp $
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* \file
|
* \file
|
||||||
|
@ -210,9 +210,8 @@ ethernode_send(void)
|
||||||
|
|
||||||
dest = ID_BROADCAST;
|
dest = ID_BROADCAST;
|
||||||
ts.tv_sec = 0;
|
ts.tv_sec = 0;
|
||||||
ts.tv_nsec = 1000;
|
ts.tv_nsec = 1000 * (random_rand() % 1000);
|
||||||
nanosleep(&ts, NULL);
|
nanosleep(&ts, NULL);
|
||||||
usleep(1000 * (random_rand() % 1000));
|
|
||||||
|
|
||||||
do_send(TYPE_DATA, dest, hdr, len);
|
do_send(TYPE_DATA, dest, hdr, len);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue