public function toSeconds($duration = null, $precision = false)
    {
        if (null !== $duration) {
            $this->parse($duration);
        }
        $this->output = ($this->days * $this->hoursPerDay * 60 * 60) + ($this->hours * 60 * 60) + ($this->minutes * 60) + $this->seconds;

        return $precision !== false ? round($this->output, $precision) : $this->output;
    }