 |
Flowgrind
Advanced TCP traffic generator
|
Go to the documentation of this file.
41 #define NSEC_PER_SEC 1000000000L
54 const char *
ctimenow_r(
char *buf,
size_t size,
bool ns);
80 const char *
ctimespec_r(
const struct timespec *tp,
char *buf,
size_t size,
94 const char *
ctimespec(
const struct timespec *tp,
bool ns);
106 double time_diff(
const struct timespec *tp1,
const struct timespec *tp2);
124 bool time_is_after(
const struct timespec *tp1,
const struct timespec *tp2);
143 void time_add(
struct timespec *tp,
double seconds);
156 int gettime(
struct timespec *tp);
double time_diff_now(const struct timespec *tp)
Returns time difference between now and the specific point in time tp.
bool time_is_after(const struct timespec *tp1, const struct timespec *tp2)
Returns true if second point in time tp2 is chronologically after the first point in time tp1.
const char * ctimenow_r(char *buf, size_t size, bool ns)
Returns the current wall-clock time as null-terminated string.
const char * ctimespec_r(const struct timespec *tp, char *buf, size_t size, bool ns)
Converts timespec struct tp into a null-terminated string.
bool normalize_tp(struct timespec *tp)
Normalizes timespec struct tp.
const char * ctimespec(const struct timespec *tp, bool ns)
Converts timespec struct tp into a null-terminated string.
const char * ctimenow(bool ns)
Returns the current wall-clock time as null-terminated string.
double time_diff(const struct timespec *tp1, const struct timespec *tp2)
Returns the time difference between two the specific points in time tp1 and tp2.
int gettime(struct timespec *tp)
Returns the current wall-clock time with nanosecond precision.
void time_add(struct timespec *tp, double seconds)
Add an amount of time seconds to a specific point in time tp.