Skip to content

Create cancelable timer objects that will call a given callback when time has elapsed. Implemented using a single scheduling thread.

License

Notifications You must be signed in to change notification settings

robfors/callback_timer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Callback Timer

A Ruby Gem to create timers. The timer objects will call a given callback when the time has elapsed or can be canceled before then. Callback Timer only uses a single thread to schedule all the timers.

Install

gem install callback_timer

Documentation

Yard Docs

Example

require 'callback_timer'

greeting_callback = proc { puts 'Hello World!' }
CallbackTimer.new(callback: greeting_callback, duration: 5)

About

Create cancelable timer objects that will call a given callback when time has elapsed. Implemented using a single scheduling thread.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages