Click or drag to resize
OSIsoft, LLC

AFTimeRangeAdjustForSyncTime Method

Adjust the time range so that the start time and end time are in sync with the syncTime.

Namespace:  OSIsoft.AF.Time
Assembly:  OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 2.10.6.195
Syntax
public void AdjustForSyncTime(
	AFTimeSpan interval,
	AFTime syncTime,
	AFBoundaryType boundaryType
)

Parameters

interval
Type: OSIsoft.AF.TimeAFTimeSpan
Interval used to calculate offset from syncTime.
syncTime
Type: OSIsoft.AF.TimeAFTime
Timestamp at which to calculate even multiplier of intervals to provide new start time and end time.
boundaryType
Type: OSIsoft.AF.DataAFBoundaryType
Boundary type to describe what to do if interval does not divide time range evenly and can affect both start time and end time.
Remarks
This is a utility method which adjusts the time range such that the start time and end time are at an even multiplier of the interval from the provided syncTime. This method was designed to be used in conjunction with data access methods (i.e. InterpolatedValues, Summaries, etc.).
Version Information

AFSDK

Supported in: 2.10.5, 2.10, 2.9.5
See Also
Enabling Operational Intelligence