lib/pulse_meter/sensor/timeline.rb
# Returts sensor data within some last seconds
# @param time_ago [Fixnum] interval length in seconds
# @return [Array<SensorData>]
# @raise ArgumentError if argumets are not valid time objects
Returts sensor data within some last seconds
Returts sensor data within some last seconds
def timeline(time_ago)
        raise ArgumentError unless time_ago.respond_to?(:to_i) && time_ago.to_i > 0
        now = Time.now
        timeline_within(now - time_ago.to_i, now)
      end
def timeline ( time_ago ) raise ArgumentError unless time_ago . respond_to? ( :to_i ) && time_ago . to_i > 0 now = Time . now timeline_within ( now - time_ago . to_i , now ) end
Returts sensor data within some last seconds
Returts sensor data within some last seconds
None
Array<SensorData>
ArgumentError if argumets are not valid time objects
ArgumentError if argumets are not valid time objects
time_ago
interval length in seconds
interval length in seconds