49#ifdef HAVE_GETTIMEOFDAY
67#ifdef CLOCKS_PER_SECOND
68#define CLOCKS_PER_SEC CLOCKS_PER_SECOND
70#define CLOCKS_PER_SEC 1000000
74#define N_USEC_PER_SEC 1000000L
99#ifdef HAVE_GETTIMEOFDAY
115 static bool first =
TRUE;
118 log_test(
"clock() returned -1, ignoring timer");
124#ifdef HAVE_GETTIMEOFDAY
131 static bool first =
TRUE;
134 log_test(
"gettimeofday() returned -1, ignoring timer");
139#elif !defined HAVE_FTIME
146 static bool first =
TRUE;
149 log_test(
"time() returned -1, ignoring timer");
193 if (
name !=
nullptr) {
194 if (
t->name !=
nullptr) {
213 if (
t->name !=
nullptr) {
228 if (
t->name !=
nullptr) {
279#ifdef HAVE_GETTIMEOFDAY
286#elif defined HAVE_FTIME
289 t->start.t = time(
nullptr);
290 if (
t->start.t == (
time_t) -1) {
324#ifdef HAVE_GETTIMEOFDAY
344#elif defined HAVE_FTIME
400#ifdef HAVE_GETTIMEOFDAY
432 + (
now.millitm - t->
start.tp.millitm);
#define log_error(message,...)
void fc_usleep(unsigned long usec)
static void report_time_failed(struct timer *t)
void timer_usleep_since_start(struct timer *t, long usec)
static void report_clock_failed(struct timer *t)
void timer_clear(struct timer *t)
bool timer_in_use(struct timer *t)
void timer_destroy(struct timer *t)
static char * timer_name(struct timer *t)
void timer_start(struct timer *t)
void timer_stop(struct timer *t)
struct timer * timer_new(enum timer_timetype type, enum timer_use use, const char *name)
double timer_read_seconds(struct timer *t)
struct timer * timer_renew(struct timer *t, enum timer_timetype type, enum timer_use use, const char *name)