Skip to content

Commit

Permalink
Merge pull request sidekiq#2280 from allcentury/ar-to_f-fix
Browse files Browse the repository at this point in the history
Removed unnecessary to_f invocations
  • Loading branch information
mperham committed Apr 1, 2015
2 parents 6be447f + b8b0d53 commit bc22848
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/sidekiq/fetch.rb
Expand Up @@ -35,7 +35,7 @@ def fetch

begin
work = @strategy.retrieve_work
::Sidekiq.logger.info("Redis is online, #{Time.now.to_f - @down.to_f} sec downtime") if @down
::Sidekiq.logger.info("Redis is online, #{Time.now - @down} sec downtime") if @down
@down = nil

if work
Expand Down
2 changes: 1 addition & 1 deletion lib/sidekiq/middleware/server/logging.rb
Expand Up @@ -22,7 +22,7 @@ def call(worker, item, queue)
end

def elapsed(start)
(Time.now - start).to_f.round(3)
(Time.now - start).round(3)
end

def logger
Expand Down

0 comments on commit bc22848

Please sign in to comment.