Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
DVR: tiny optimization in dvr_entry_set_timer()
  • Loading branch information
perexg committed Aug 15, 2016
1 parent 4a9268e commit be7f24a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/dvr/dvr_db.c
Expand Up @@ -593,21 +593,19 @@ dvr_usage_count(access_t *aa)
void
dvr_entry_set_timer(dvr_entry_t *de)
{
time_t now, start, stop;
time_t now = gclk(), start, stop;

if (dvr_in_init)
return;

time(&now);

start = dvr_entry_get_start_time(de, 1);
stop = dvr_entry_get_stop_time(de);

if (now >= stop || de->de_dont_reschedule) {

/* EPG thinks that the program is running */
if(de->de_running_start > de->de_running_stop && !de->de_dont_reschedule) {
stop = gclk() + 10;
stop = now + 10;
if (de->de_sched_state == DVR_RECORDING)
goto recording;
}
Expand Down

0 comments on commit be7f24a

Please sign in to comment.