operator ~/ 方法

Duration operator ~/(
  1. int quotient
)

将此 Duration 除以给定的 quotient,并返回作为新 Duration 对象的截断结果。

quotient 不能为 0

实现

Duration operator ~/(int quotient) {
  // By doing the check here instead of relying on "~/" below we get the
  // exception even with dart2js.
  if (quotient == 0) throw IntegerDivisionByZeroException();
  return Duration._microseconds(_duration ~/ quotient);
}