Open grtlr opened 2 years ago
Pushed
Reopen (if needed)
Could you please add an example on how to use this? With the regular interval channel the duration is passed in at compile time as a const
generic. How would that work for std::time::Duration
? Thanks!
Pass the std::time::Duration
using spawn_with_channel/start_with_channel
Or impl ChannelBuilder<Duration>
for YourActor.
I will add an example
Cool, thank you!
Motivation
It would be great if
IntervalChannel
could be used withstd::time::Duration
as that would lead to more self-documenting code.Open questions
Since
std::time::Duration
is mostlyconst
this could even be performed at compile time.Are you planning to do it yourself in a pull request?
Yes/No.