Class Cabin::Timer
In: lib/cabin/timer.rb
lib/cabin/timer.rb
Parent: Object

A simple timer class for timing events like a stop watch. Normally you don‘t invoke this yourself, but you are welcome to do so.

See also: Cabin::Channel#time

Methods

new   new   stop   stop  

Public Class methods

Public Instance methods

Stop the clock and call the callback with the duration. Also returns the duration of this timer.

Stop the clock and call the callback with the duration. Also returns the duration of this timer.

[Validate]