korken89 / fugit

`fugit` provides a comprehensive library of `Duration` and `Instant` for the handling of time in embedded systems, doing all it can at compile time.
Apache License 2.0
56 stars 16 forks source link

Add nanosecond units alongside the others #20

Closed adamgreig closed 2 years ago

adamgreig commented 2 years ago

Since fugit already supports rendering nanosecond timebases, perhaps we could include nanoseconds alongside microseconds etc. Nanoseconds are used for PTP times so it would make working with them more convenient.

By the way, I added .gitattributes to make merge conflicts on CHANGELOG less likely; union means it will try and combine lines from both commits if possible which should do the right thing on a changelog. Happy to take this out if you want, of course!

korken89 commented 2 years ago

The changelog got conflicts after the merge of your other PR, could you rebase on master?

jordens commented 2 years ago

What about picoseconds? I can see some use-cases mid-term (TDCs, printing accurate time measurements). But also the stuff in helpers.rs would need a u64/u128 version.

korken89 commented 2 years ago

@jordens Could you open a separate issue or a PoC PR?

bors[bot] commented 2 years ago

Build succeeded: