Use string instead of float as clock device output format #696
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: