fix: wait only 1 seconds between transmit

This commit is contained in:
2025-12-16 09:40:47 -06:00
parent ef875a060b
commit e159d0816a

View File

@@ -1,5 +1,6 @@
#include "dns.h"
#include "host.h"
#include "interval.h"
#include "packet.h"
#include "print.h"
#include "setting.h"
@@ -160,7 +161,9 @@ int main(int ac, char **av)
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))
goto error3;