Click or drag to resize
OSIsoft, LLC

AFTimeSpanGetIntervalTimes Method

Get the list of interval times for the specified AFTimeRange.

Namespace:  OSIsoft.AF.Time
Assembly:  OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 2.10.6.195
Syntax
public IList<AFTime> GetIntervalTimes(
	AFTimeRange timeRange
)

Parameters

timeRange
Type: OSIsoft.AF.TimeAFTimeRange
The AFTimeRange specifying the boundaries for the returned interval times.

Return Value

Type: IListAFTime
Returns the interval times within the specified timeRange.
Exceptions
ExceptionCondition
InvalidOperationException When this time span is Zero.
Remarks

This method will calculate interval times that are within the specified timeRange. The sign of the current AFTimeSpan determines which end of the timeRange is used to start calculating interval times. A positive span will start the calculation beginning with the earlier time of the timeRange. A negative span (see IsNegative) will start the calculation beginning with the latest time of the timeRange. The returned times will be in increasing order when the StartTime is less than the EndTime. Otherwise the returned times will be in decreasing order.

The following table illustrates the interaction between timeRange and this time span.

Time RangeTime SpanTimestamps returned
Ascending (Y to T)Positive (5h)Y, Y+5h, Y+10h, Y+15h, Y+20h
Descending (T to Y)Positive (5h)Y+20h, Y+15h, Y+10h, Y+5h, Y
Ascending (Y to T)Negative (-5h)T-20h, T-15h, T-10h, T-5h, T
Descending (T to Y)Negative (-5h)T, T-5h, T-10h, T-15h, T-20h

Version Information

AFSDK

Supported in: 2.10.5, 2.10, 2.9.5, 2.9, 2.8.5, 2.8, 2.7.5, 2.7, 2.6, 2.5, 2.4
See Also
Enabling Operational Intelligence