Skip to content

Fix last change precision - #1669

Merged
troglobit merged 2 commits into
mainfrom
fix-last-change-precision
Sep 28, 2026
Merged

troglobit merged 2 commits into
mainfrom
fix-last-change-precision

Conversation

@mattiaswal

Copy link
Copy Markdown
Contributor

This actually fix a flaky test on x86, when testing for last-changed the changes sometimes got in the same second, therfore failed.

Description

Checklist

Tick relevant boxes, this PR is-a or has-a:

  • Bugfix
    • Regression tests
    • ChangeLog updates (for next release)
  • Feature
    • YANG model change => revision updated?
    • Regression tests added?
    • ChangeLog updates (for next release)
    • Documentation added?
  • Test changes
    • Checked in changed Readme.adoc (make test-spec)
    • Added new test to group Readme.adoc and yaml file
  • Code style update (formatting, renaming)
  • Refactoring (please detail in commit messages)
  • Build related changes
  • Documentation content changes
    • ChangeLog updated (for major changes)
  • Other (please describe):

The strptime format rejected fractional seconds and non-positive offsets.

Signed-off-by: Mattias Walström <lazzer@gmail.com>
Truncating the realtime and monotonic clocks separately before
subtracting let the same stamp read one second apart on consecutive
GETs.  Compute the offset from full-precision timespecs and floor it
once.

Signed-off-by: Mattias Walström <lazzer@gmail.com>
@troglobit
troglobit merged commit 27e7ab3 into main Sep 28, 2026
9 checks passed
@troglobit
troglobit deleted the fix-last-change-precision branch September 28, 2026 16:50
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.

2 participants