Module: Resque::Plugins::JobStats::Timeseries::Common

Included in:
Enqueued, Performed
Defined in:
lib/resque/plugins/job_stats/timeseries.rb

Instance Method Summary collapse

Instance Method Details

#timestampObject

A timestamp rounded to the lowest minute



13
14
15
16
# File 'lib/resque/plugins/job_stats/timeseries.rb', line 13

def timestamp
  time = Time.now.utc
  Time.at(time.to_i - time.sec).utc   # to_i removes usecs
end