## modules/ut/timediff.c

/* [<][>][^][v][top][bottom][index][help] */

## FUNCTIONS

This source file includes following functions.

1. UT_timediff
2. UT_timeget

       1
       2 #include <timediff.h>
       3
       4 /* difference between two times obtained with UT_store_time */
       5
       6 float UT_timediff( ut_timer_t *begintime, ut_timer_t *endtime )
         /* [<][>][^][v][top][bottom][index][help] */
       7 {
       8   return ( endtime->tv_sec - begintime->tv_sec ) +
       9     1e-6 * ( endtime->tv_usec - begintime->tv_usec ) ;
      10 }
      11
      12 void
      13 UT_timeget(ut_timer_t *timer)
         /* [<][>][^][v][top][bottom][index][help] */
      14 {
      15   gettimeofday( timer, NULL );
      16 }

/* [<][>][^][v][top][bottom][index][help] */