AFTimeSpan.GetEvenTimeIntervalDefinitions Method
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
Get the list of evenly spaced interval definitions that are within the specified
AFTimeRange.
Namespace: OSIsoft.AF.Time
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public IList<AFTimeIntervalDefinition> GetEvenTimeIntervalDefinitions( AFTimeRange timeRange )
Public Function GetEvenTimeIntervalDefinitions ( timeRange As AFTimeRange ) As IList(Of AFTimeIntervalDefinition) Dim instance As AFTimeSpan Dim timeRange As AFTimeRange Dim returnValue As IList(Of AFTimeIntervalDefinition) returnValue = instance.GetEvenTimeIntervalDefinitions(timeRange)
public: IList<AFTimeIntervalDefinition>^ GetEvenTimeIntervalDefinitions( AFTimeRange timeRange )
member GetEvenTimeIntervalDefinitions : timeRange : AFTimeRange -> IList<AFTimeIntervalDefinition>
Parameters
- timeRange
- Type: OSIsoft.AF.TimeAFTimeRange
The AFTimeRange specifying the boundaries for the returned interval time definitions.
Return Value
Type: IListAFTimeIntervalDefinitionReturns the interval time definitions within the specified timeRange. When the current AFTimeSpan is greater than the specified timeRange, then one interval time definition will be returned where the Range is set to the specified timeRange and the NumberOfIntervals is set to one.
Exceptions
| Exception | Condition |
|---|---|
| InvalidOperationException | When this time span is Zero. |
Remarks
This method will calculate the evenly spaced interval definitions that are
within the specified timeRange by taking into account
transitions between Daylight Savings Time.
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 interval definitions will always be returned in increasing order
regardless of the order of the StartTime and
EndTime in the timeRange.