app/controllers/project_stats_controller.rb
# Report the time we should cache, given seconds since midnight and
# the fact that a log event will occur at "log_time". If the current
# time and log time are within CACHE_TIME_WITHIN_SLOP, return a small
# cache value.
Report the time we should cache, given seconds since midnight and
the fact that a log event will occur at "log_time". If the current
time and log time are within CACHE_TIME_WITHIN_SLOP, return a small
cache value.
Report the time we should cache given seconds since midnight and the fact that a log event will occur at " log_time " . If the current time and log time are within CACHE_TIME_WITHIN_SLOP return a small cache value .
def cache_time(seconds_since_midnight)
    time_left = LOG_TIME - seconds_since_midnight
    if time_left.abs < LOG_TIME_SLOP
      CACHE_TIME_WITHIN_SLOP
    else
      time_left += SECONDS_IN_A_DAY if time_left.negative?
      time_left
    end
  end
def cache_time ( seconds_since_midnight ) time_left = LOG_TIME - seconds_since_midnight if time_left . abs < LOG_TIME_SLOP CACHE_TIME_WITHIN_SLOP else time_left += SECONDS_IN_A_DAY if time_left . negative? time_left end end
Report the time we should cache, given seconds since midnight and
the fact that a log event will occur at "log_time".
Report the time we should cache given seconds since midnight and the fact that a log event will occur at " log_time " .
seconds_since_midnight
<not_specific>