Discover Packages
github.com/agentruntimecontrolprotocol/go-sdk
internal
clock
package
Version:
v1.1.0
Opens a new window with list of versions in this module.
Published: May 22, 2026
License: Apache-2.0
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package clock defines the small Clock interface used by the runtime
for testable time. Production wires real wall time; tests inject a
Mock that they can step forward manually.
Clock abstracts time.Now() and time.AfterFunc.
Real returns a Clock that uses wall-clock time.
Mock is a controllable Clock for tests.
NewMock returns a Mock initialised to t.
Advance moves the clock forward by d, firing any expired timers.
AfterFunc schedules f to fire when the mock clock reaches now+d.
Now returns the mocked time.
Timer is the minimal subset of *time.Timer that callers need.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.