advance method

void advance(
  1. Duration delta
)

Advances the clock by delta. Asserts delta is non-negative to preserve the monotonic-time invariant.

Implementation

void advance(Duration delta) {
  assert(
    !delta.isNegative,
    'FakeClock.advance requires a non-negative delta; '
    'monotonic time cannot move backwards.',
  );
  _now += delta;
}