「🏗️」 wip: wtf is this
This commit is contained in:
14
src/utils.c
Normal file
14
src/utils.c
Normal file
@ -0,0 +1,14 @@
|
||||
#include <ping.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
void append_time(double time) {
|
||||
if (times == NULL) {
|
||||
times = malloc(sizeof(double));
|
||||
times[0] = time;
|
||||
} else {
|
||||
times = reallocarray(times, rx_count, sizeof(double));
|
||||
times[rx_count - 1] = time;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user