Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,16 @@ A C++ scheduling library using cron formatting.
Libcron offers an easy to use API to add callbacks with corresponding cron-formatted strings:

```
#include <libcron/Cron.h>
#include <libcron/CronData.h>
#include <chrono>
#include <thread>
using namespace std::chrono_literals;

libcron::Cron cron;

cron.add_schedule("Hello from Cron", "* * * * * ?", [=](auto&) {
std::cout << "Hello from libcron!" std::endl;
std::cout << "Hello from libcron!" << std::endl;
});
```

Expand All @@ -19,7 +25,7 @@ To trigger the execution of callbacks, one must call `libcron::Cron::tick` at le
while(true)
{
cron.tick();
std::this_thread::sleep_for(500mS);
std::this_thread::sleep_for(500ms);
}
```

Expand Down