Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
epggrab: module - use monotonic clocks to measure time diff
  • Loading branch information
perexg committed Mar 16, 2016
1 parent 20cfeaf commit 7adc49f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/epggrab/module.c
Expand Up @@ -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);
Expand Down

0 comments on commit 7adc49f

Please sign in to comment.