Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use string instead of float as clock device output format #696

Merged
merged 4 commits into from
Oct 31, 2024

Conversation

vinc
Copy link
Owner

@vinc vinc commented Oct 30, 2024

Until now reading /dev/clk/boot or /dev/clk/epoch would return 8 bytes containing a 64 bit float which was good in term of compactness but we might decide to use a different internal representation for those clocks like a 64 bit integer for the number of seconds and a 32 or 64 bit integer for the nanoseconds part.

It also introduced a special case for reading those device files. A better interface would be to use a plain text ASCII string instead, this way we can read those files like any other files. The bytes returned will need to be parsed from string to float but there was already a conversion needed from bytes to float.

It is another breaking change for the next release necessitating to delete the device files and the lisp library and install the new version but there was already a breaking change concerning them:

> delete /dev/clk/*

> delete /lib/lisp/file.lsp

> install

@vinc vinc marked this pull request as ready for review October 31, 2024 18:05
@vinc vinc merged commit e6f8911 into trunk Oct 31, 2024
1 check passed
@vinc vinc deleted the feature/clock-string branch October 31, 2024 18:05
@vinc vinc mentioned this pull request Nov 2, 2024
@vinc vinc mentioned this pull request Dec 21, 2024
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