
/* interval is a pointer to a struct used by the functions
   in the file interval.c. As such it constitutes an opaque data type */

typedef struct interval_t *interval;

/* the function interval_init creates and initialises a new
   interval_t struct and returns its address */

interval interval_init(void);

/* The function interval_destroy frees the memory for an interval
   variable and NULLs its value to prevent accidental reuse.
   It returns zero on success, -1 when an invalid pointer
   is passed as an argument. */

int interval_destroy(interval *intervalPtr);

/* the function interval_time returns the wall clock time,
   user CPU time and system CPU time for the calling process
   and its children consumed since the previous call for the
   specified interval.
   It returns zero on success, -1 when an invalid pointer
   is passed as an argument. */

int interval_time(interval id, double *wct, double *ust, double *syt);
