public function setUnit($unit)
    {
        $validUnits = self::getValidUnits();

        if (!in_array($unit, $validUnits)) {
            throw new \InvalidArgumentException('Unknown value for time unit interval.');
        }

        $this->unit = $unit;

        return $this;
    }