formatProviderTimeout function

String formatProviderTimeout(
  1. Duration d
)

The stall-surface duration renderer: sub-second windows render as <N>ms — a mis-keyed 150ms window must be recognizable verbatim in the terminal and notice lines (gh-1617 AC4 names config values); everything else goes through the tenths-of-a-second humanizer.

Implementation

String formatProviderTimeout(Duration d) {
  final ms = d.inMilliseconds;
  if (ms > 0 && ms < 1000) return '${ms}ms';
  return _humanize(d);
}