fd::timepiece_settings — Settings for a schedule_timepiece
.
// In header: <fd/timepiece_settings.h> struct timepiece_settings { // Facilitate 'downtime' schedules - only valid for fixed duration schedules. enum fixed_duration_as { fixed_duration = false, inverse_fixed_duration = true }; // public member functions shared_date_adjustment_function date_adjustor() const; // public data members boost::posix_time::time_duration onsetDelay; // How much time an onset should be delayed; this is an additional static offset added to each onset. fixed_duration_as inverseFixedDuration; // Facilitate 'downtime' schedules - only valid for fixed duration schedules. std::u8string dateAdjustmentRule; // Facilitate advanced yearly calendar date schedules on fixed dates using named rules. shared_date_adjustor_map dateAdjustors; };
timepiece_settings
public
public data membersboost::posix_time::time_duration onsetDelay;
![]() |
Important |
---|---|
Currently, the delay must not be greater than the uptime for a downtime schedule. |
![]() |
Note |
---|---|
(technical) A delay has the effect of offsetting each onset time point, effectively moving the onset nearer to the ending. It is applied when comparing to 'now' (while advancing) and when retrieving the currently scheduled time point - or in other words after all time point calculations have been performed. This means that the ending point doesn't change, also not if a duration is specified (which already has separated the ending from the next onset like in anticipating the length of a note). |
fixed_duration_as inverseFixedDuration;
It greatly simplifies iterating over periods (for the application); Effectively, an interval schedule swaps the onset/completion onsets of a fixed 'downtime' duration schedule, such turning the schedule into a fixed 'uptime' duration schedule.
std::u8string dateAdjustmentRule;
The built-in rules are:
us_federal_holiday_observance_rule
us_inauguration_day_observance_rule