Class: Neo4j::Driver::Internal::Clock

Inherits:
Object
  • Object
show all
Defined in:
lib/neo4j/driver/internal/clock.rb

Overview

The driver's clock. Every internal that measures elapsed time — pool idle/lifetime/acquisition, connection deadlines, routing-table ttl, managed-tx retry budget — reads it instead of calling Process/Time directly, and gets it injected (DriverFactory#create_clock, threaded through as its own clock: parameter). This default reads the real monotonic and wall clocks; testkit-backend supplies its own via the same seam (see Internal::ClockAdapter). The internals are agnostic to which clock they hold — there is no notion of "real" vs "mock" below this line.

Instance Method Summary collapse

Instance Method Details

#monotonicObject



15
# File 'lib/neo4j/driver/internal/clock.rb', line 15

def monotonic = Process.clock_gettime(Process::CLOCK_MONOTONIC)

#realtimeObject



16
# File 'lib/neo4j/driver/internal/clock.rb', line 16

def realtime = ::Time.now