FluenTech / embedded-time

Time(ing) library (Instant/Duration/Clock/Timer/Period/Frequency) for bare-metal embedded systems
Apache License 2.0
90 stars 17 forks source link

Async support #129

Open diondokter opened 1 year ago

diondokter commented 1 year ago

Now that GATs are stable, async support can be added on stable. This would really help when writing async code.

Some of the APIs that would benefit from this are: https://github.com/FluenTech/embedded-time/blob/83b09cb9c4e4c27fdc10e1089aab87b69a0436c9/src/clock.rs#L48 https://github.com/FluenTech/embedded-time/blob/83b09cb9c4e4c27fdc10e1089aab87b69a0436c9/src/timer.rs#L115 https://github.com/FluenTech/embedded-time/blob/83b09cb9c4e4c27fdc10e1089aab87b69a0436c9/src/timer.rs#L140 https://github.com/FluenTech/embedded-time/blob/83b09cb9c4e4c27fdc10e1089aab87b69a0436c9/src/timer.rs#L163

The async APIs should probably be made parallel to the existing APIs and not replace them