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

ruby-concurrency / concurrent-ruby / #2938

11 Aug 2014 02:52PM UTC coverage: 45.217% (-45.4%) from 90.621%
#2938

push

jdantonio
Removed Rbx from Travis allowed failures list.

1366 of 3021 relevant lines covered (45.22%)

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✔
14
    raise ArgumentError.new('no block given') unless block_given?
×
15
    raise ArgumentError.new('interval must be greater than or equal to zero') if seconds < 0
×
16

17
    Concurrent.configuration.global_timer_set.post(seconds, *args, &block)
×
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