hardbyte / hardbyte/python-can
Store timestamps in nanosecond precision
未关闭
enhancement
- 主要语言
- Python
- 星标
- 1.6k
- 派生
- 697
- PR 合并指标
- 30 天内没有已合并 PR
描述
We currently store timestamps in float format while most interfaces and log formats use some integer representation. Converting these to floating point is a lossy operation.
My proposal is to add an additional `timestamp_ns` argument and attribute to the Message class. On initialization, if the `timestamp` argument is given it would be converted to ns. The `.timestamp` attribute can be dynamically calculated on get and set.
It would be fairly trivial to update the interfaces and log formats to use ns timestamps instead.
贡献指南
评估
这个 Issue 还没有评估数据。