]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
epggrab: module - use monotonic clocks to measure time diff
authorJaroslav Kysela <perex@perex.cz>
Wed, 16 Mar 2016 13:00:11 +0000 (14:00 +0100)
committerJaroslav Kysela <perex@perex.cz>
Wed, 16 Mar 2016 13:00:11 +0000 (14:00 +0100)
src/epggrab/module.c

index d0b9a0f8c6c8445f9f15715c267ec412aa30cbcc..36d940078bd87d4c71b5e03dccf2f2b3714a3817 100644 (file)
@@ -249,20 +249,20 @@ epggrab_module_t *epggrab_module_create
  */
 void epggrab_module_parse( void *m, htsmsg_t *data )
 {
-  time_t tm1, tm2;
+  int64_t tm1, tm2;
   int save = 0;
   epggrab_stats_t stats;
   epggrab_module_int_t *mod = m;
 
   /* Parse */
   memset(&stats, 0, sizeof(stats));
-  time(&tm1);
+  tm1 = getfastmonoclock();
   save |= mod->parse(mod, data, &stats);
-  time(&tm2);
+  tm2 = getfastmonoclock();
   htsmsg_destroy(data);
 
   /* Debug stats */
-  tvhlog(LOG_INFO, mod->id, "parse took %"PRItime_t" seconds", tm2 - tm1);
+  tvhlog(LOG_INFO, mod->id, "parse took %"PRItime_t" seconds", mono2sec(tm2 - tm1));
   tvhlog(LOG_INFO, mod->id, "  channels   tot=%5d new=%5d mod=%5d",
          stats.channels.total, stats.channels.created,
          stats.channels.modified);