
#include <timediff.h>

/* difference between two times obtained with UT_store_time */

float UT_timediff( ut_timer_t *begintime, ut_timer_t *endtime )
{
  return ( endtime->tv_sec - begintime->tv_sec ) +
    1e-6 * ( endtime->tv_usec - begintime->tv_usec ) ;
}

void
UT_timeget(ut_timer_t *timer)
{
  gettimeofday( timer, NULL );
}
