• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ruby-concurrency / concurrent-ruby / #2835

05 Oct 2014 10:16PM UTC coverage: 45.201% (-49.6%) from 94.81%
#2835

push

jdantonio
Merge pull request #158 from obrok/promise-composition

Promise composition

2 of 15 new or added lines in 1 file covered. (13.33%)

1514 existing lines in 84 files now uncovered.

1375 of 3042 relevant lines covered (45.2%)

0.66 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

55.56
/lib/concurrent/utility/timer.rb
1
require 'concurrent/configuration'
1✔
2
require 'thread'
1✔
3

4
module Concurrent
1✔
5

6
  # Perform the given operation asynchronously after the given number of seconds.
7
  #
8
  # @param [Fixnum] seconds the interval in seconds to wait before executing the task
9
  #
10
  # @yield the task to execute
11
  #
12
  # @return [Boolean] true
13
  def timer(seconds, *args, &block)
1✔
UNCOV
14
    raise ArgumentError.new('no block given') unless block_given?
×
UNCOV
15
    raise ArgumentError.new('interval must be greater than or equal to zero') if seconds < 0
×
16

UNCOV
17
    Concurrent.configuration.global_timer_set.post(seconds, *args, &block)
×
UNCOV
18
    true
×
19
  end
20
  module_function :timer
1✔
21
end
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc