getStallTimeoutMs function

int getStallTimeoutMs()

Get the stall timeout in milliseconds, checking env override first.

Implementation

int getStallTimeoutMs() {
  final envVal = Platform.environment['MAGE_STALL_TIMEOUT_MS_FOR_TESTING'];
  if (envVal != null) {
    final parsed = int.tryParse(envVal);
    if (parsed != null && parsed > 0) return parsed;
  }
  return defaultStallTimeoutMs;
}