Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Make sure the sleep time is positive before sleeping

  • Loading branch information...
commit 087e606d4de935198814423178d91bd5cf19dcd2 1 parent c8d354a
@eric authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/metriks/reporter/logger.rb
View
4 lib/metriks/reporter/logger.rb
@@ -121,7 +121,9 @@ def initialize(interval)
def sleep
sleep_time = next_time - Time.now.to_f
- Kernel.sleep(sleep_time)
+ if sleep_time > 0
+ Kernel.sleep(sleep_time)
+ end
end
def next_time
Please sign in to comment.
Something went wrong with that request. Please try again.