Browse files

Fix problem with Time.now

  • Loading branch information...
1 parent 59a6e9f commit cebf76abb62a809a13530a4cfe6e7c76c47095a7 root committed Jul 9, 2008
Showing with 4 additions and 4 deletions.
  1. +4 −4 backfire.rb
View
8 backfire.rb
@@ -86,11 +86,11 @@ def self.update_campfire
def self.go(interval = 20)# seconds
puts 'Starting backfire'
- last_run = Time.now
+ last_run = 0
while not exit
- if Time.now - last_run > interval
+ if Time.now.to_i - last_run > interval
update_campfire
- last_run = Time.now
+ last_run = Time.now.to_i
end
sleep 5
end
@@ -152,4 +152,4 @@ def self.all
trap('INT') { puts 'Exiting...'; Backfire.exit = true }
-Backfire.go(Backfire.config['global']['interval'])
+Backfire.go(Backfire.config['global']['interval'])

0 comments on commit cebf76a

Please sign in to comment.