add method

void add(
  1. T units
)

Adds the specified number of units to the total number of units.

Implementation

void add(T units) {
  if (_startedAt == 0) {
    _startedAt = _stopwatch.elapsedTicks;
  }

  _units = (_units as num) + (units as num) as T;
}