lib/polyphony/core/global_api.rb
# Spins up a fiber that will run the given block after sleeping for the
# given delay.
#
# @param delay [Number] delay in seconds before running the given block
# @param &block [Proc] block to run
# @return [Fiber] spun fiber
Spins up a fiber that will run the given block after sleeping for the
given delay.
Spins up a fiber that will run the given block after sleeping for the given delay .
def after(interval, &block)
      spin do
        sleep interval
        block.()
      end
    end
def after ( interval , & block ) spin do sleep interval block . ( ) end end
Spins up a fiber that will run the given block after sleeping for the
given delay.
Spins up a fiber that will run the given block after sleeping for the given delay .
None
Fiber
interval
<not_specific>
block
<not_specific>
delay
<not_specific>
delay in seconds before running the given block
delay in seconds before running the given block
&block
<not_specific>
block to run
block to run