about summary refs log tree commit homepage
path: root/lib/yahns/fdmap.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/yahns/fdmap.rb')
-rw-r--r--lib/yahns/fdmap.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/yahns/fdmap.rb b/lib/yahns/fdmap.rb
index bac327e..d1f752a 100644
--- a/lib/yahns/fdmap.rb
+++ b/lib/yahns/fdmap.rb
@@ -81,7 +81,7 @@ class Yahns::Fdmap # :nodoc:
   def __expire(timeout)
     return if @count == 0
     nr = 0
-    now = Time.now.to_f
+    now = Yahns.now
     (now - @last_expire) >= 1.0 or return # don't expire too frequently
 
     # @fdmap_ary may be huge, so always expire a bunch at once to
@@ -93,7 +93,7 @@ class Yahns::Fdmap # :nodoc:
       nr += c.yahns_expire(tout)
     end
 
-    @last_expire = Time.now.to_f
+    @last_expire = Yahns.now
     msg = timeout ? "timeout=#{timeout}" : "client_timeout"
     @logger.info("dropping #{nr} of #@count clients for #{msg}")
   end