samplingClock property

SamplingClock samplingClock

Provides access to the current DateTime and StopWatch objects for sampling.

Overridden by debugSamplingClock for debug builds and testing. Using this object under test will maintain synchronization with FakeAsync.

Implementation

SamplingClock get samplingClock {
  SamplingClock value = SamplingClock();
  assert(() {
    final SamplingClock? debugValue = debugSamplingClock;
    if (debugValue != null) {
      value = debugValue;
    }
    return true;
  }());
  return value;
}