#include <time.h>
#include "timer.h"



void TimerStart(timer__t *timer){
  gettimeofday (timer, NULL);
}


double TimerElapsed (timer__t *timer)
{
   struct timeval t;
   gettimeofday (&t, NULL);
   return t.tv_sec - timer->tv_sec + (t.tv_usec - timer->tv_usec) / 1e6;
}
