Class: Hackle::FixedClock

Inherits:
Object
  • Object
show all
Includes:
Clock
Defined in:
lib/hackle/internal/clock/clock.rb

Instance Method Summary collapse

Constructor Details

#initialize(time) ⇒ FixedClock

Returns a new instance of FixedClock.

Parameters:

  • time (Integer)


35
36
37
# File 'lib/hackle/internal/clock/clock.rb', line 35

def initialize(time)
  @time = time
end

Instance Method Details

#current_millisObject



39
40
41
# File 'lib/hackle/internal/clock/clock.rb', line 39

def current_millis
  @time
end

#tickObject



43
44
45
# File 'lib/hackle/internal/clock/clock.rb', line 43

def tick
  @time
end