hardbyte / hardbyte/python-can
Store timestamps in nanosecond precision
Đang mở
enhancement
- Ngôn ngữ chính
- Python
- Star
- 1.6k
- Fork
- 697
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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.
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.