Class: Vapir::TimeKeeper

Inherits:
Object
  • Object
show all
Defined in:
lib/vapir-common/waiter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeTimeKeeper

Returns a new instance of TimeKeeper.



11
12
13
# File 'lib/vapir-common/waiter.rb', line 11

def initialize 
  @sleep_time = 0.0
end

Instance Attribute Details

#sleep_timeObject (readonly)

Returns the value of attribute sleep_time.



10
11
12
# File 'lib/vapir-common/waiter.rb', line 10

def sleep_time
  @sleep_time
end

Instance Method Details

#nowObject



17
18
19
# File 'lib/vapir-common/waiter.rb', line 17

def now
  Time.now
end

#sleep(seconds) ⇒ Object



14
15
16
# File 'lib/vapir-common/waiter.rb', line 14

def sleep seconds
  @sleep_time += Kernel.sleep seconds
end