TcMenu / TaskManagerIO

A task, event, scheduling, and interrupt marshalling library for Arduino and mbed boards.
Apache License 2.0
124 stars 14 forks source link

Ability to describe schedules using a more standard syntax, on boards that support std lib. #9

Closed davetcc closed 2 years ago

davetcc commented 4 years ago

We should look into being able to use something like the std library to describe time frames on boards that support std::chrono. This may not include all 8-bit boards.

For example, if submitting a long-running task as described in #8 for say, 1 day's time, it would be better to use some kind of chronology function such as days(1) rather than saying 3600 * 24 seconds.

This needs a bit of refinement before any work is done.

davetcc commented 2 years ago

I’ve created a few helper functions that make it easier to define delays for events. I think for now the syntax is fairly clear and doesn’t feel overly verbose.