Sha256: 1d688d166757345ad4139e5d7e6431d779966d57433385b41938f714c023eec1

Contents?: true

Size: 869 Bytes

Versions: 17

Compression:

Stored size: 869 Bytes

Contents

module HTTPX
  class Timers
    @intervals: Array[Interval]
    @next_interval_at: Float

    def after: (Numeric interval_in_secs, ^() -> void) -> Interval
             | (Numeric interval_in_secs) { () -> void } -> Interval

    def wait_interval: () -> Numeric?

    def fire: (?TimeoutError error) -> void

    def initialize: () -> void

    class Interval
      include Comparable

      type callback = ^() -> void

      attr_reader interval: Numeric

      @callbacks: Array[callback]
      @on_empty: callback?


      def on_empty: () { () -> void } -> void

      def to_f: () -> Float

      def <<: (callback) -> void

      def delete: (callback) -> void

      def elapse: (Numeric elapsed) -> Numeric

      def elapsed?: () -> bool

      def no_callbacks?: () -> bool

      private

      def initialize: (Numeric interval) -> void
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
httpx-1.3.4 sig/timers.rbs
httpx-1.3.3 sig/timers.rbs
httpx-1.3.2 sig/timers.rbs
httpx-1.3.1 sig/timers.rbs
httpx-1.3.0 sig/timers.rbs
httpx-1.2.6 sig/timers.rbs
httpx-1.2.4 sig/timers.rbs
httpx-1.2.3 sig/timers.rbs
httpx-1.2.2 sig/timers.rbs
httpx-1.2.1 sig/timers.rbs
httpx-1.2.0 sig/timers.rbs
httpx-1.1.5 sig/timers.rbs
httpx-1.1.4 sig/timers.rbs
httpx-1.1.3 sig/timers.rbs
httpx-1.1.2 sig/timers.rbs
httpx-1.1.1 sig/timers.rbs
httpx-1.1.0 sig/timers.rbs