Class: Loba::Internal::TimeKeeper
- Inherits:
-
Object
- Object
- Loba::Internal::TimeKeeper
- Includes:
- Singleton
- Defined in:
- lib/loba.rb
Overview
Internal class for tracking time stamps; should not be used directly
Instance Attribute Summary collapse
-
#timenum ⇒ Object
Count of timestamping occurances so far.
-
#timewas ⇒ Object
Previous timestamped Time value.
Instance Method Summary collapse
-
#initialize ⇒ TimeKeeper
constructor
A new instance of TimeKeeper.
Constructor Details
#initialize ⇒ TimeKeeper
Returns a new instance of TimeKeeper.
243 244 245 |
# File 'lib/loba.rb', line 243 def initialize @timewas, @timenum = Time.now, 0 end |
Instance Attribute Details
#timenum ⇒ Object
Count of timestamping occurances so far
240 241 242 243 244 245 246 |
# File 'lib/loba.rb', line 240 class TimeKeeper include Singleton attr_accessor :timewas, :timenum def initialize @timewas, @timenum = Time.now, 0 end end |
#timewas ⇒ Object
Previous timestamped Time value
240 241 242 243 244 245 246 |
# File 'lib/loba.rb', line 240 class TimeKeeper include Singleton attr_accessor :timewas, :timenum def initialize @timewas, @timenum = Time.now, 0 end end |