Struct timepiece_settings

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(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 construct/copy/destruct

  1. timepiece_settings();
  2. timepiece_settings(boost::posix_time::time_duration onsetDelay);
  3. timepiece_settings(fixed_duration_as inverseFixedDuration);
  4. timepiece_settings(boost::posix_time::time_duration onsetDelay, 
                       fixed_duration_as inverseFixedDuration);

timepiece_settings public public data members

  1. boost::posix_time::time_duration onsetDelay;
    [Note] Note

    Currently, the delay must not be greater than the uptime for a downtime schedule.

    [Note] 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).

  2. 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.