TimeSpan.fromUnitAndValue constructor

TimeSpan.fromUnitAndValue(
  1. int units,
  2. int value
)

Creates a new TimeSpan object based on the unit and value entered.

@param units the type of unit to use to create a TimeSpan instance. @param value the number of units to use to create a TimeSpan instance.

Implementation

TimeSpan.fromUnitAndValue(int units, int value) {
  this.time = TimeSpan.toMilliseconds(units, value);
}