This whole conditional block of code can be just one line - `time_left = @el_conf.timer - @elapsed_time` as long as we make sure `@elapsed_time` equals zero at all time it is not being used. Then this expression can be just put as is on seTimeout