fd::timepiece_settings — Settings for a schedule_timepiece
.
// In header: <fd/schedule_timepiece.h> struct timepiece_settings { // Facilitate 'downtime' schedules - only valid for fixed duration schedules. enum fixed_duration_as { fixed_duration = = false, inverse_fixed_duration = = true }; // construct/copy/destruct timepiece_settings(); timepiece_settings(boost::posix_time::time_duration); timepiece_settings(fixed_duration_as); timepiece_settings(boost::posix_time::time_duration, fixed_duration_as); // 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. };
timepiece_settings
public
public data membersboost::posix_time::time_duration onsetDelay;
Note | |
---|---|
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.