advance method

DateTime advance(
  1. Duration duration
)

Moves the clock forward by duration.

Implementation

DateTime advance(Duration duration) {
  if (duration.isNegative) {
    throw ArgumentError.value(duration, 'duration', 'must not be negative');
  }
  return _now = _now.add(duration);
}