Class: Stoplight::Infrastructure::SystemClock

Inherits:
Object
  • Object
show all
Defined in:
lib/stoplight/infrastructure/system_clock.rb

Overview

Production clock implementation using Ruby’s Time class.

Default clock for all Stoplight time-dependent operations including bucket calculation, window boundaries, and state transition timestamps.

Instance Method Summary collapse

Instance Method Details

#at(timestamp) ⇒ Object



13
# File 'lib/stoplight/infrastructure/system_clock.rb', line 13

def at(timestamp) = Time.at(timestamp)

#current_timeObject



11
# File 'lib/stoplight/infrastructure/system_clock.rb', line 11

def current_time = Time.now