ifpps: Remove unused 'forks' member from struct ifstat
[netsniff-ng.git] / taia.c
blob4d02dd9fbdd4f65ef439f6be1895151ff476510d
1 #include <stdbool.h>
3 #include "taia.h"
5 static const struct taia tolerance_taia = {
6 .sec.x = 0,
7 .nano = 700000000ULL,
8 .atto = 0,
9 };
11 bool taia_looks_good(struct taia *arr_taia, struct taia *pkt_taia)
13 bool good = false;
14 struct taia tmp;
16 if (taia_less(arr_taia, pkt_taia)) {
17 taia_sub(&tmp, pkt_taia, arr_taia);
18 if (taia_less(&tmp, &tolerance_taia))
19 good = true;
20 } else {
21 taia_sub(&tmp, arr_taia, pkt_taia);
22 if (taia_less(&tmp, &tolerance_taia))
23 good = true;
26 return good;