|
TicksAlignToSubsecondDistribution Method
|
Returns a floor-aligned sub-second distribution timestamp for given timestamp.
Namespace: GSFAssembly: GSF.Core (in GSF.Core.dll) Version: 2.4.218-beta+101eee949414e414795e55a6e73d88938f0177b8
Syntax public static Ticks AlignToSubsecondDistribution(
Ticks timestamp,
int samplesPerSecond,
long timeResolution
)
Public Shared Function AlignToSubsecondDistribution (
timestamp As Ticks,
samplesPerSecond As Integer,
timeResolution As Long
) As Ticks
public:
static Ticks AlignToSubsecondDistribution(
Ticks timestamp,
int samplesPerSecond,
long long timeResolution
)
static member AlignToSubsecondDistribution :
timestamp : Ticks *
samplesPerSecond : int *
timeResolution : int64 -> Ticks
GSF.Ticks.AlignToSubsecondDistribution = function(timestamp, samplesPerSecond, timeResolution);
View SourceParameters
- timestamp Ticks
- Timestamp to align.
- samplesPerSecond Int32
- Samples per second to use for distribution.
- timeResolution Int64
- Defines the time resolution to use when aligning timestamp to its proper distribution timestamp.
Return Value
TicksA floor-aligned sub-second distribution timestamp for given
timestamp.
Remarks
Time resolution value is typically a power of 10 based on the number of ticks per the desired resolution. The following table defines
common resolutions and their respective
timeResolution values:
If source timestamps have variation, i.e., they are not aligned within common distributions, the
timeResolution
can be adjusted to include slack to accommodate the variance. When including slack in the time resolution, the value will depend
on the
samplesPerSecond, for example: you could use 330,000 for 30 samples per second, 160,000 for 60 samples
per second, and 80,000 for 120 samples per second. Actual slack value may need to be more or less depending on the size of the
source timestamp variation.
See Also