0
#if defined(HAVE_TIMES)
#include <unistd.h>
static double cycles_diff(struct tms *a,struct tms *b)
{

      clock_t aa = a->tms_utime  +
                   a->tms_stime  +
                   a->tms_cutime +
                   a->tms_cstime;

      clock_t bb = b->tmstms_utime
            +      b->tms_stime
            +      b->tms_cutime
            +      b->tms_cstime;

      return (aa-bb)/(double)sysconf(_SC_CLK_TCK);
  }
}

This gives errors

incomplete type declaration of struc tms

and

sysconf was not declared

spraff
  • 32,570
  • 22
  • 121
  • 229
isaha
  • 1
  • 1

1 Answers1

1

According to the manual you need to #include <sys/times.h>

spraff
  • 32,570
  • 22
  • 121
  • 229