fix: wait only 1 seconds between transmit
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
#include "dns.h"
|
#include "dns.h"
|
||||||
#include "host.h"
|
#include "host.h"
|
||||||
|
#include "interval.h"
|
||||||
#include "packet.h"
|
#include "packet.h"
|
||||||
#include "print.h"
|
#include "print.h"
|
||||||
#include "setting.h"
|
#include "setting.h"
|
||||||
@@ -160,7 +161,9 @@ int main(int ac, char **av)
|
|||||||
print_recv(&settings, buffer, &start, &stop, &sender);
|
print_recv(&settings, buffer, &start, &stop, &sender);
|
||||||
}
|
}
|
||||||
|
|
||||||
sleep(1);
|
double interval = get_interval(&start, &stop);
|
||||||
|
if (interval < 1000)
|
||||||
|
usleep((1000 - interval) * 1e3);
|
||||||
|
|
||||||
if (packet_update(packet, settings.payload_size))
|
if (packet_update(packet, settings.payload_size))
|
||||||
goto error3;
|
goto error3;
|
||||||
|
|||||||
Reference in New Issue
Block a user