module SensuCheckHelpers::Time
Public Instance Methods
as_seconds(duration)
click to toggle source
# File lib/sensu-check-helpers/time.rb, line 9 def as_seconds(duration) ChronicDuration.parse(duration.to_s, keep_zero: true) end
pretty_time(duration)
click to toggle source
# File lib/sensu-check-helpers/time.rb, line 13 def pretty_time(duration) ChronicDuration.output(duration, format: :long) end
time_period_in_seconds(end_time, start_time)
click to toggle source
# File lib/sensu-check-helpers/time.rb, line 5 def time_period_in_seconds(end_time, start_time) end_time - start_time end