Newest-wins write coalescing with a trailing flush. More...
| Header: | #include <WriteRateLimiter> |
| Inherits: | QObject |
A dragged control would write its store once per mouse move. For a document level each write re-serializes the scene, so the limiter keeps only the newest value per key and writes it at most once per interval.
The contract, per key:
The clock is injectable and flush() is public, so a test drives a whole drag and asserts the count of writes, not the timing. Lifted from Construct (config-ui §CFGS-1), with the discard made per key.