mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-10-04 00:00:37 -04:00
35 lines
627 B
Plaintext
35 lines
627 B
Plaintext
module HTTPX
|
|
class Timers
|
|
@intervals: Array[Interval]
|
|
@next_interval_at: Float
|
|
|
|
def after: (Numeric interval_in_secs) { () -> void } -> void
|
|
|
|
def wait_interval: () -> Numeric?
|
|
|
|
def fire: (?TimeoutError error) -> void
|
|
|
|
def cancel: () -> void
|
|
|
|
private
|
|
|
|
def initialize: () -> void
|
|
|
|
class Interval
|
|
include Comparable
|
|
|
|
attr_reader interval: Numeric
|
|
|
|
@callbacks: Array[^() -> void]
|
|
|
|
def to_f: () -> Float
|
|
|
|
def <<: (^() -> void) -> void
|
|
|
|
def elapse: (Numeric elapsed) -> Numeric
|
|
private
|
|
|
|
def initialize: (Numeric interval) -> void
|
|
end
|
|
end
|
|
end |