# Timers 1.0.0: pure Ruby timer collections

**URL:** <https://www.ruby-forum.com/t/timers-1-0-0-pure-ruby-timer-collections/226332>\
**Category:** Ruby\
**Created:** [July 16, 2012, 2:25am UTC](https://www.ruby-forum.com/t/timers-1-0-0-pure-ruby-timer-collections/226332 "2012-07-16T02:25:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![murfhy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/d26b3c/32.png) [@murfhy](https://www.ruby-forum.com/u/murfhy)\
**Post date:** [July 16, 2012, 2:25am UTC](https://www.ruby-forum.com/t/timers-1-0-0-pure-ruby-timer-collections/226332/1 "2012-07-16T02:25:56Z")

</div>

The ‘timers’ gem provides easy-to-use timer collections that can be  
used independently or inside of event loops:

> **[GitHub - socketry/timers: Pure Ruby timers collections suitable for use with...](https://github.com/socketry/timers)**
>
> Pure Ruby timers collections suitable for use with event loops - GitHub - socketry/timers: Pure Ruby timers collections suitable for use with event loops

The timers gem is an extraction of Celluloid’s timers, as they can be  
generally used inside of any event loop that supports a timeout and  
wants  
to provide scheduled events. The timers gem can be used alongside  
Kernel.select or the nio4r gem which provides a scalable IO selector  
API:

> **[GitHub - tarcieri/nio4r: Cross-platform asynchronous I/O primitives for...](https://github.com/tarcieri/nio4r)**
>
> Cross-platform asynchronous I/O primitives for scalable network clients and servers. - GitHub - tarcieri/nio4r: Cross-platform asynchronous I/O primitives for scalable network clients and servers.

The actual implementation is small (~110 loc) but should be useful to  
anyone needing efficient timer functionality in pure Ruby:

> <https://github.com/socketry/timers/blob/main/lib/timers.rb>
