module Zero
Singleton module for immediate timeouts (zero or negative). Avoids object allocation for fast path (non-blocking) timeouts.
Definitions
def self.expired?
Check if the deadline has expired.
Signature
-
returns
Boolean
Always returns true since zero timeouts are immediately expired.
Implementation
def self.expired?
true
end
def self.remaining
Get the remaining time.
Signature
-
returns
Integer
Always returns 0 since zero timeouts have no remaining time.
Implementation
def self.remaining
0
end