TicksAlignToSubsecondDistribution Method
Returns a floor-aligned sub-second distribution timestamp for given timestamp.
Namespace: GemstoneAssembly: Gemstone.Common (in Gemstone.Common.dll) Version: 1.0.128 -- Release Build+d050cfc5563c89a1188cc3c6b2d417530856f490
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
)
Gemstone.Ticks.AlignToSubsecondDistribution = function(timestamp, samplesPerSecond, timeResolution);
- 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.
TicksA floor-aligned sub-second distribution timestamp for given
timestamp.
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.