Lazy clock reads; demo: auto-advancing +1h clock, module-level setup

This commit is contained in:
Leo Vasanko
2026-08-07 00:01:16 +00:00
parent 8d9e948d27
commit 5d66d423da
7 changed files with 98 additions and 88 deletions
+2
View File
@@ -168,6 +168,8 @@ when they have a default value.
- `@kanta.clock` registers a callback `() -> datetime` that replaces the
default UTC clock. Its value is used for all record timestamps (`ts`, and
`m` when `mtime` is `True`) and for snapshot timestamps.
- The clock is only read when a timestamp is actually produced; no-op
transactions and skipped snapshot checks do not read it.
- Register before `open()` so that bootstrap and migration records use the
custom clock as well. This is mainly useful for tests and reproducible
demos.