Skip to content

persona: the real clock carries each stamp's rounding remainder - #107

Merged
BitmapAsset merged 1 commit into
mainfrom
clock-rate-exact
Nov 26, 2026
Merged

BitmapAsset merged 1 commit into
mainfrom
clock-rate-exact

Conversation

@BitmapAsset

Copy link
Copy Markdown
Owner

Fixes time lost on the real clock at high event rates (100 % at ~2.7k events/s, 99 % at 1,000/s, 12 % at 200/s; under 0.2 % after). Fixed clock, strand format and recorded strands unchanged; the repository's strands verify with identical output. Details and measurements in the commit message and CHANGELOG.

On the real clock an event's elapsed_hours is quantised to 1e-6 h (3.6 ms),
but the clock's previous reading moved to the unrounded time, so every
stamp's rounding remainder was dropped: events closer than 1.8 ms apart
were all stamped 0. The clock now advances by the stamp itself, so the
stamps add up to the wall time within half a quantum at any event rate.

Measured with the release CLI, an example persona and 2,000 empty events
per rate: the time stamped on events 2..N against the wall time from the
first stance to the last (loss %; negative: more time stamped than passed).

  events/s                  before    after
  as fast as taken (~2.7k)  100       -0.19
  1,000                      99.1     -0.03
  200                        11.9      0.00
  50                         -0.19     0.00
  10                         -0.04     0.00

The fixed clock, the strand format and recorded strands are unchanged:
replay reads the recorded elapsed_hours, and the repository's strands
verify with output identical to before.
@BitmapAsset
BitmapAsset merged commit a26b279 into main Nov 26, 2026
20 checks passed
@BitmapAsset
BitmapAsset deleted the clock-rate-exact branch November 26, 2026 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant