Module: Stoplight::Domain::_Clock

Included in:
Infrastructure::SystemClock
Defined in:
sig/_private/stoplight/domain/ports/clock.rbs

Overview

Wall-clock interface for time-dependent operations.

Provides a centralized definition of how Stoplight obtains and interprets time. All time-dependent components should use this interface rather than calling Time methods directly, ensuring consistent time handling across the library.

Instance Method Summary collapse

Instance Method Details

#atTime

Converts a Unix timestamp to a Time object.

Parameters:

  • (timestamp)

Returns:

  • (Time)


15
# File 'sig/_private/stoplight/domain/ports/clock.rbs', line 15

def at: (timestamp) -> Time

#current_timeTime

Returns the current time.

Returns:

  • (Time)


12
# File 'sig/_private/stoplight/domain/ports/clock.rbs', line 12

def current_time: () -> Time