analyze: add new "calendar" command

This little new command can parse, validate, normalize calendar events,
and calculate when they will elapse next. This should be useful for
anyone writing calendar events and who'd like to validate the expression
before running them as timer units.
This commit is contained in:
Lennart Poettering
2017-11-20 10:57:41 +01:00
parent 9a9a4f10e9
commit 6d86f4bd11
4 changed files with 88 additions and 1 deletions
+2
View File
@@ -61,3 +61,5 @@ int calendar_spec_to_string(const CalendarSpec *spec, char **p);
int calendar_spec_from_string(const char *p, CalendarSpec **spec);
int calendar_spec_next_usec(const CalendarSpec *spec, usec_t usec, usec_t *next);
DEFINE_TRIVIAL_CLEANUP_FUNC(CalendarSpec*, calendar_spec_free);