MockDeviceVendorInfoLoader.simulateDelay constructor
MockDeviceVendorInfoLoader.simulateDelay(
- BiosInfo biosInfo,
- BoardInfo boardInfo,
- SystemInfo systemInfo, {
- Duration initialDelay,
- Duration latestResponse,
Assign biosInfo
, boardInfo
and systemInfo
with random
generated delay for more realistic emulation on fetching
data.
The Duration of random generated delay is based on a range from initialDelay
to latestResponse
and pick a Duration value between the range in
milliseconds. Hence, applying negative Duration or initialDelay
is greater than
latestResponse
will throw ArgumentError.
Implementation
factory MockDeviceVendorInfoLoader.simulateDelay(
BiosInfo biosInfo, BoardInfo boardInfo, SystemInfo systemInfo,
{Duration initialDelay,
Duration latestResponse}) = _DelayedMockDeviceVendorInfoLoader;