25 gettimeofday(&ts_old,NULL);
30 gettimeofday(&ts_new, NULL);
31 t = ts_new.tv_sec - ts_old.tv_sec;
32 t += ((double)(ts_new.tv_usec - ts_old.tv_usec))/1000000.0;
37 double record_time() {
38 gettimeofday(&ts_new, NULL);
39 t = ts_new.tv_sec - ts_last.tv_sec;
40 t += ((double)(ts_new.tv_usec - ts_last.tv_usec))/1000000.0;