Convert the decay_time function into one that truly creates an exponentially decaying average over opt_log_interval.