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:
public void AdjustForSyncTime(
	AFTimeSpan interval,
	AFTime syncTime,
	AFBoundaryType boundaryType


Type: OSIsoft.AF.TimeAFTimeSpan
Interval used to calculate offset from syncTime.
Type: OSIsoft.AF.TimeAFTime
Timestamp at which to calculate even multiplier of intervals to provide new start time and end time.
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.
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


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