/* If we're a child, this is the first call we did ourselves. */
static struct failtest_call *our_history_start = NULL;
/* For printing runtime with --trace. */
-static struct timeval start;
+static struct timespec start;
/* Set when failtest_hook returns FAIL_PROBE */
static bool probing = false;
/* Table to track duplicates. */
if (child == 0) {
traceindent++;
if (tracef) {
- struct timeval diff;
+ struct timespec diff;
const char *p;
char *failpath;
struct failtest_call *c;
p = c->file;
trace("%u->%u (%u.%02u): %s (%s:%u)\n",
getppid(), getpid(),
- (int)diff.tv_sec, (int)diff.tv_usec / 10000,
+ (int)diff.tv_sec, (int)diff.tv_nsec / 10000000,
failpath, p, c->line);
free(failpath);
}
ALL_TOOLS = tools/configurator/configurator tools/ccan_depends tools/doc_extract tools/namespacize tools/ccanlint/ccanlint
-
+LDLIBS = -lrt
DEP_OBJS = ccan/grab_file/grab_file.o \
ccan/noerr/noerr.o \
ccan/read_write_all/read_write_all.o \
signal(SIGALRM, killme);
itim.it_interval.tv_sec = itim.it_interval.tv_usec = 0;
- itim.it_value = time_from_msec(c->time_ms);
+ itim.it_value = timespec_to_timeval(time_from_msec(c->time_ms));
setitimer(ITIMER_REAL, &itim, NULL);
c->status = system(c->command);
int p[2];
char *ret;
int status, ms;
- struct timeval start;
+ struct timespec start;
*ok = false;
if (pipe(p) != 0)
signal(SIGALRM, killme);
itim.it_interval.tv_sec = itim.it_interval.tv_usec = 0;
- itim.it_value = time_from_msec(*timeout_ms);
+ itim.it_value = timespec_to_timeval(time_from_msec(*timeout_ms));
setitimer(ITIMER_REAL, &itim, NULL);
status = system(cmd);