/* GLIB_CHECK_VERSION(2,28,0) adds g_get_real_time which could minimize or replace this  */
static void compute_elapsed(capture_file *cf, GTimeVal *start_time)
/* GLIB_CHECK_VERSION(2,28,0) adds g_get_real_time which could minimize or replace this  */
static void compute_elapsed(capture_file *cf, GTimeVal *start_time)
{
  gdouble  delta_time;
  GTimeVal time_now;
  g_get_current_time(&time_now);
  delta_time = (time_now.tv_sec - start_time->tv_sec) * 1e6 +
    time_now.tv_usec - start_time->tv_usec;
  cf->computed_elapsed = (gulong) (delta_time / 1000);
}