diff options
author | Patrick J Cherry <patrick@bytemark.co.uk> | 2011-08-10 16:09:08 +0100 |
---|---|---|
committer | Patrick J Cherry <patrick@bytemark.co.uk> | 2011-08-10 16:09:08 +0100 |
commit | f1608b8098d0302f7e5c0e7989c78fa310d7d424 (patch) | |
tree | f4e1a9a9a5f6c0873bc568c96a21fbade7170104 /lib/mauve/timer.rb | |
parent | a54a32084e9870af6f1ede97887c2332c21e812c (diff) |
Removed MauveTime. Added more tests.
Diffstat (limited to 'lib/mauve/timer.rb')
-rw-r--r-- | lib/mauve/timer.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/mauve/timer.rb b/lib/mauve/timer.rb index 1c8c37c..00af255 100644 --- a/lib/mauve/timer.rb +++ b/lib/mauve/timer.rb @@ -21,7 +21,7 @@ module Mauve # If we didn't find an alert, or the alert we found is due in the future, # look for the next alert_changed object. # - if next_alert.nil? or next_alert.due_at > MauveTime.now + if next_alert.nil? or next_alert.due_at > Time.now next_alert_changed = AlertChanged.find_next_with_event end @@ -50,7 +50,7 @@ module Mauve # La la la nothing to do. # logger.info("Next to notify: #{next_to_notify} #{next_to_notify.is_a?(AlertChanged) ? "(reminder)" : "(heartbeat)"} -- snoozing until #{next_to_notify.due_at.iso8601}") - sleep_loops = ((next_to_notify.due_at - MauveTime.now).to_f / 0.1).round.to_i + sleep_loops = ((next_to_notify.due_at - Time.now).to_f / 0.1).round.to_i end sleep_loops = 1 if sleep_loops.nil? or sleep_loops < 1 |