MCPcopy Create free account
hub / github.com/PerpetualSoftware/pad / SetLinkClockForTesting

Method SetLinkClockForTesting

internal/store/testing_helpers.go:363–367  ·  view source on GitHub ↗

SetLinkClockForTesting sets the clock the linked-change time budget reads. Production code must not call this. Set it only with no request in flight.

(clock func() time.Time)

Source from the content-addressed store, hash-verified

361// SetLinkClockForTesting sets the clock the linked-change time budget reads.
362// Production code must not call this. Set it only with no request in flight.
363func (s *Store) SetLinkClockForTesting(clock func() time.Time) (restore func()) {
364 prev := s.linkClock
365 s.linkClock = clock
366 return func() { s.linkClock = prev }
367}

Calls

no outgoing calls