8 Commits

Author SHA1 Message Date
Heinz-Peter Liechtenecker
7ef39558a1
Feature/add executed on time check (#7)
* Initial commit on executed on time feature. A task was executed on time if the function call happened within one second since it expired.

* Adding tests, fixing some errors.

* Using recursirve mutex to allowing to call safely call was_executed_on_time in an Mt-environment

* Changing from boolean expression to get_delay, being even more flexibel

* Cleanup

* Adding dedicated TaskContext

* Changing to Interface-Class Approach

* Renaming to TaskInformation, making it pure virtual

* Removing unnecessary Proxy-Class

* Cleaning up

* Passing a const reference instead of a pointer to avoid nullptr checks in the callback

* Cleaning up add_schedule.

* Adding TaskInformation API to readme.

Co-authored-by: Heinz-Peter Liechtenecker <h.liechtenecker@fh-kaernten.at>
2020-09-10 19:03:50 +02:00
Heinz-Peter Liechtenecker
76da315c13
Adding remove-feature to Cron-Class (#6)
* Adding functions to remove a specific schedule (by the given name) or all scheduled tasks from the Cron class.

* Update libcron/include/libcron/Task.h

Co-authored-by: Per Malmberg <PerMalmberg@users.noreply.github.com>

* Update libcron/include/libcron/Task.h

Co-authored-by: Per Malmberg <PerMalmberg@users.noreply.github.com>

* Update libcron/include/libcron/Cron.h

Co-authored-by: Per Malmberg <PerMalmberg@users.noreply.github.com>

* Update libcron/include/libcron/Cron.h

Co-authored-by: Per Malmberg <PerMalmberg@users.noreply.github.com>

* Update libcron/include/libcron/Cron.h

Co-authored-by: Per Malmberg <PerMalmberg@users.noreply.github.com>

* Adding Multithreading support via template, adding documentation

* Apply suggestions from code review

Co-authored-by: Per Malmberg <PerMalmberg@users.noreply.github.com>

* Finishing suggestions from code-review (renaming elements)

Co-authored-by: Per Malmberg <PerMalmberg@users.noreply.github.com>
2020-09-02 15:57:14 +02:00
Per Malmberg
d61086f69e Implemented support for using textual names in randomization. 2019-05-17 13:39:32 +02:00
Per Malmberg
802d8e724e #1 Updated readme, added test cases for examples. 2019-03-15 11:18:10 +01:00
Per Malmberg
9f7c5dc2fa Added LocalClock. 2018-03-11 23:38:12 +01:00
Per Malmberg
be2b4424a1 Added note about UTC. 2018-03-11 19:07:35 +01:00
Per Malmberg
d7c17be4d1 Updated README.
Added tests.
Made use of ? mandatory for DoM/DoW.
2018-03-11 18:45:27 +01:00
Per Malmberg
24cfe15a79
Initial commit 2018-03-08 23:09:11 +01:00