You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The engine only has ConstantTime{Dilation,Compression} — piecewise-linear slopes. A clock built from these changes rate instantly at every window boundary, which is exactly the tell the bedside-clock use case is trying to hide ("ease into the slowing so it isn't obvious"). This adds distortions whose rate varies smoothly across the window (ease-in/ease-out, Gaussian roll-off, etc.).
The waypoint/product framing makes the snap visible: any piecewise-constant schedule has detectable kinks at the seams.
Proposed direction
A new RelativeTimeDistortion subclass family overriding distortTime(numberOfMilliseconds, offset). The extension point already exists.
Critical invariant:distortTime must return the definite integral of the rate curve over [offset, offset + length], not a point sample — otherwise polling-frequency independence (test/Clock.invariants.test.ts) breaks, since the integrator sums arbitrary slices.
The curve's total over the window must still satisfy the relativeDuration vs referenceDuration contract so windows net out / hit targets as today.
Out of scope / open questions
Which curves to ship first (cosine ease-in-out is the simplest closed-form integral; Gaussian needs an erf approximation).
Summary
The engine only has
ConstantTime{Dilation,Compression}— piecewise-linear slopes. A clock built from these changes rate instantly at every window boundary, which is exactly the tell the bedside-clock use case is trying to hide ("ease into the slowing so it isn't obvious"). This adds distortions whose rate varies smoothly across the window (ease-in/ease-out, Gaussian roll-off, etc.).Motivation
publish#3 ("something smoother than theConstantTime*distortions… Gaussian roll-offs").Proposed direction
RelativeTimeDistortionsubclass family overridingdistortTime(numberOfMilliseconds, offset). The extension point already exists.distortTimemust return the definite integral of the rate curve over[offset, offset + length], not a point sample — otherwise polling-frequency independence (test/Clock.invariants.test.ts) breaks, since the integrator sums arbitrary slices.relativeDurationvsreferenceDurationcontract so windows net out / hit targets as today.Out of scope / open questions