if (!
is_int($precision) ||
$precision < 1 ||
$precision > 9
) { throw new Zend_Date_Exception("precision (
$precision) must be a positive integer less than 10", 0, null,
$precision);
} $this->_fractional +=
$milli;
// Add/sub milliseconds + add/sub seconds
$max =
pow(10,
$this->_precision
);
// Milli includes seconds
if ($this->_fractional >=
$max) { while ($this->_fractional >=
$max) { $this->
addSecond(1
);
$this->_fractional -=
$max;
} } if ($this->_fractional < 0
) { while ($this->_fractional < 0
) { $this->
subSecond(1
);
$this->_fractional +=
$max;
} }