updating sleep to allow nil arguments
parent
b0ce2c0003
commit
0b0af0a4f5
|
@ -91,7 +91,7 @@ require 'rex/platforms'
|
|||
|
||||
# Overload the Kernel.sleep() function to be thread-safe
|
||||
Kernel.class_eval("
|
||||
def sleep(seconds)
|
||||
def sleep(seconds=nil)
|
||||
Rex::ThreadSafe.sleep(seconds)
|
||||
end
|
||||
")
|
||||
|
|
|
@ -72,7 +72,7 @@ module ThreadSafe
|
|||
# Simulates a sleep operation by selecting on nil until a timeout period
|
||||
# expires.
|
||||
#
|
||||
def self.sleep(seconds)
|
||||
def self.sleep(seconds=nil)
|
||||
self.select(nil, nil, nil, seconds)
|
||||
|
||||
seconds
|
||||
|
|
Loading…
Reference in New Issue