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.
貢獻指南
研究方向
先定位 Message 類別,並閱讀其 timestamp 的初始化、儲存和公開方式。接著追蹤提案中提到的介面和日誌格式,以識別每個 timestamp 邊界。當奈秒值保持無損,且現有的 timestamp 存取在這些介面和格式之間持續一致地運作時,即表示完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- python
- 領域
- embedded-iot
- Issue 類型
- 功能
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100