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
55 stars 16 forks source link

No negative `Duration` possible #47

Open thvdveld opened 6 months ago

thvdveld commented 6 months ago

I was thinking to use fugit as my time library, but I really need negative durations. An example for the use case is a time sensitive radio link-layer protocol that uses time corrections for time synchronization. These time corrections can also be negative.

I'm wondering why there is no negative durations possible with fugit. chrono::Duration, a type alias of chrono::TimeDelta allows for negative duration. Is it because of the performance impact of using signed numbers?