—
NAME
TIMEVAL_TO_TIMESPEC, TIMESPEC_TO_TIMEVAL - convert between time structures
SYNOPSIS
bash
#define _GNU_SOURCE\n
\n#include <sys/time.h>bash
void TIMEVAL_TO_TIMESPEC(const struct timeval *\ntv\n, struct timespec *\nts\n);\n
\nvoid TIMESPEC_TO_TIMEVAL(struct timeval *\ntv\n, const struct timespec *\nts\n);DESCRIPTION
These macros convert from a timeval(3type) to a timespec(3type) structure, and vice versa, respectively.
This is especially useful for writing interfaces that receive a type, but are implemented with calls to functions that receive the other one.
STANDARDS
GNU, BSD.