PrevUpHomeNext

Function template uptime_bounds_for_action

fd::uptime_bounds_for_action — Determine coalesced uptime bounds for the given action schedule.

Synopsis

// In header: <fd/algorithm.h>


template<std::ranges::forward_range Rng> 
  std::optional< std::pair< schedule_timepoint, schedule_timepoint > > 
  uptime_bounds_for_action(const schedule_timepiece & actionSchedule, 
                           const Rng & schedules);

Description

[Note] Note

The reference timpoint is the 'action' schedule's current end timepoint.

Parameters:

actionSchedule

A single timepoint generator used as an 'action' schedule, whose current end timepoint is used.

schedules

List of timepoint generators.

Returns:

  • std::nullopt if actionSchedule isn't an 'action' schedule or @schedules don't contain any 'fixed duration' schedule.

  • empty timepoint bounds [{ not_a_date_time, not_a_date_time }] if outside of 'uptime' schedules or within a 'halt' schedule.

  • otherwise the coaleseced uptime bounds (i.e. longest duration period) of all 'fixed duration' schedules.


PrevUpHomeNext