RubyGems Navigation menu

cadence 0.0.1

Track counts and compute rate of iteration. Set up callbacks for various intervals such as every n increments or every n ticks. computer = Cadence::Computer.new do |c| c.every 5 do p [:completed_processing, n] end end computer.start do |c| 1.upto(100) do |n| c.next # do magic here end end Mostly intended for providing intermitent feedback of the progress of tasks that will run for lengthy periods of time. Rudimentary support for time-based callbacks is possible through #ticks.

Versions:

  1. 0.0.2 - September 1, 2010 (4.5 KB)
  2. 0.0.1 - September 1, 2010 (4.5 KB)

Authors:

  • Matt Todd

Owners:

B6861bc75bff3c594212338a914a39ad

Total downloads 4,449

For this version 1,774

Required Ruby Version: None

Licenses:

N/A

Gemfile:
gem 'cadence', '~> 0.0.1' = Copy to clipboard Copied!

install:
gem install cadence -v 0.0.1 = Copy to clipboard Copied!

Links: