Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix problem with Time.now

  • Loading branch information...
commit cebf76abb62a809a13530a4cfe6e7c76c47095a7 1 parent 59a6e9f
root authored
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'])
Please sign in to comment.
Something went wrong with that request. Please try again.