MockStreamTiming
public static class MockStreamTimingTiming rules of the stream rhythms, shared by MockStream and other tools' mock streams so a rhythm means the same everywhere.
Fields
Section titled “Fields”
MinDripGap
Section titled “MinDripGap”public const float MinDripGap = 0.05Shortest Drip gap, as a fraction of the average interval.
Returns
System.Single
MaxDripGap
Section titled “MaxDripGap”public const float MaxDripGap = 5Longest Drip gap, as a multiple of the average interval.
Returns
System.Single
Methods
Section titled “Methods”
PointsPerEmission(StreamRhythm, int)
Section titled “PointsPerEmission(StreamRhythm, int)”public static int PointsPerEmission(StreamRhythm rhythm, int requested)Points one emission carries: StreamRhythm.Drip always emits a single point, the other rhythms requested points, at least one.
Parameters
| Name | Type |
|---|---|
rhythm |
MockMagic.StreamRhythm |
requested |
System.Int32 |
Returns
System.Int32
DripGap(float, double)
Section titled “DripGap(float, double)”public static float DripGap(float averageInterval, double unit)The wait before the next StreamRhythm.Drip point. Gaps are exponentially distributed around averageInterval, like independent events such as sensor reads, trades or log entries: mostly short with occasional long pauses, kept between MockStreamTiming.MinDripGap and MockStreamTiming.MaxDripGap times the average.
Parameters
| Name | Type | Description |
|---|---|---|
averageInterval |
System.Single | Average seconds between points. |
unit |
System.Double | A uniform random value in [0, 1), so seeded random sources replay the same gaps. |
Returns
System.Single