@event-driven-platform/clock
v0.0.5
Published
Clock abstraction for deterministic event-driven platform execution infrastructure.
Downloads
645
Readme
@event-driven-platform/clock
Provides the clock abstraction used by execution components that need deterministic access to time.
Installation
pnpm add @event-driven-platform/clockAPI
Clock— time-source contract.SystemClock— default implementation backed by the system clock.FixedClock— deterministic implementation that always returns a configured timestamp.
Use SystemClock in production code that needs wall-clock time. Use FixedClock where deterministic time is useful, such as tests or controlled execution scenarios.
import { FixedClock } from '@event-driven-platform/clock';
const clock = new FixedClock('2026-07-18T10:00:00.000Z');
clock.now(); // '2026-07-18T10:00:00.000Z'