hardbyte / hardbyte/python-can

Store timestamps in nanosecond precision

未关闭
#722 0 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看
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 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。