throttleInterval property
Get the minimum time between delivered updates.
A sample arriving sooner than this is dropped, not delivered later.
Returns
- Duration: The minimum time between delivered updates. Duration.zero means no throttling.
See also:
- dataType - The data type this policy applies to.
Implementation
Duration get throttleInterval {
final OperationResult resultString = objectMethod(
pointerId,
'DataDeliveryPolicy',
'throttleIntervalMs',
);
return Duration(milliseconds: (resultString['result'] as num).toInt());
}
Set the minimum time between delivered updates.
A sample arriving sooner than this is dropped, not delivered later. The new value applies from the next sample.
The shortest usable interval is one millisecond. A positive duration shorter than that is raised to one millisecond. Duration.zero and any negative duration mean no throttling, and the getter reports Duration.zero for them.
Parameters
value: (Duration) The minimum time between delivered updates. Duration.zero, or any duration at or below it, means no throttling. A positive duration shorter than one millisecond is raised to one millisecond.
See also:
- throttleInterval getter - Check the current value.
- dataType - The data type this policy applies to.
Implementation
set throttleInterval(Duration value) {
objectMethod(
pointerId,
'DataDeliveryPolicy',
'setThrottleIntervalMs',
args: _throttleIntervalMs(value),
);
}