Class: Hackle::SystemClock

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.instanceSystemClock

Returns:



18
19
20
# File 'lib/hackle/internal/clock/clock.rb', line 18

def self.instance
  @instance
end

Instance Method Details

#current_millisObject



22
23
24
# File 'lib/hackle/internal/clock/clock.rb', line 22

def current_millis
  (Time.now.to_f * 1000).to_i
end

#tickObject



26
27
28
# File 'lib/hackle/internal/clock/clock.rb', line 26

def tick
  (Time.now.to_f * 1000 * 1000 * 1000).to_i
end