clearTimeline method

Future<void> clearTimeline ({Duration timeout })

Clears all timeline events recorded up until now.

Implementation

Future<void> clearTimeline({ Duration timeout }) async {
  timeout ??= _shortTimeout(timeoutMultiplier);
  try {
    await _peer
        .sendRequest(_clearVMTimelineMethodName, <String, String>{})
        .timeout(timeout);
  } catch (error, stackTrace) {
    throw DriverError(
      'Failed to clear event timeline due to remote error',
      error,
      stackTrace,
    );
  }
}