Subsecond console flush intervals are rounded down
- Dominant language
- Scala
- Stars
- 314
- Forks
- 187
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 214
Description
### Feature Summary
`TimedBuffer` measures elapsed time with the whole-seconds `timedelta.seconds` field but compares it to a millisecond configuration. Subsecond thresholds are rounded down, so the default 500 ms console flush does not occur until at least one full second has elapsed.
Expected behavior: messages flush as soon as the configured millisecond interval is reached.
Before: a 500 ms buffer still holds a message after 600 ms
After: the message flushes at the 500 ms boundary
Reproduction evidence:
Create a `TimedBuffer` with a 500 ms interval, add one message, set its last output time 600 ms in the past, and call `get`. The returned iterator is empty.
Version and commit evidence:
1.3.0-incubating-SNAPSHOT on main
**Commit Hash (Optional)**
50321e403c82df299a13deb50a7f9849dd93bdba
**Browsers**
Not browser specific
**Relevant log output**
At 600 ms elapsed, zero messages are emitted and one remains buffered.
### Proposed Solution or Design
Expected behavior: messages flush as soon as the configured millisecond interval is reached.
After: the message flushes at the 500 ms boundary
### Affected Area
Workflow Engine (Amber)
Contributor guide
Assessment
This issue has not been assessed yet.