read static method

Future<PendingWork> read(
  1. VmServiceRuntime runtime,
  2. Duration sinceDelivery, {
  3. int? appClockOffsetMs,
})

Reads the app's pending timers (the VM keeps them in a private heap of the dart:isolate library) and in-flight requests; sinceDelivery is how long ago delivery ended. Empty when the VM or SDK does not expose them.

Implementation

static Future<PendingWork> read(VmServiceRuntime runtime, Duration sinceDelivery, {int? appClockOffsetMs}) async {
  final results = await Future.wait([
    _timers(runtime, sinceDelivery),
    _httpInFlight(runtime, sinceDelivery, appClockOffsetMs),
  ]);
  return PendingWork(timersDueMs: results[0] as List<int>, httpInFlight: results[1] as int);
}