public function splitTimeWindow($timeWindow, $default = 3600)
    {
        $timeWindow = (int) $timeWindow;
        if ($timeWindow <= 0) {
            $timeWindow = (int) $default;
        }
        foreach (array_keys($this->getTimeWindowUnits()) as $u) {
            if (($timeWindow % $u) === 0) {
                $unit = $u;
            } else {
                break;
            }
        }

        return [
            (int) ($timeWindow / $unit),
            $unit,
        ];
    }
public function splitTimeWindow($timeWindow, $default = 3600)
    {
        $timeWindow = (int) $timeWindow;
        if ($timeWindow <= 0) {
            $timeWindow = (int) $default;
        }
        foreach (array_keys($this->getTimeWindowUnits()) as $u) {
            if (($timeWindow % $u) === 0) {
                $unit = $u;
            } else {
                break;
            }
        }

        return [
            (int) ($timeWindow / $unit),
            $unit,
        ];
    }
public function splitTimeWindow ( $ timeWindow , $ default = 3600 ) { $ timeWindow = ( int ) $ timeWindow ; if ( $ timeWindow <= 0 ) { $ timeWindow = ( int ) $ default ; } foreach ( array_keys ( $ this -> getTimeWindowUnits ( ) ) as $ u ) { if ( ( $ timeWindow % $ u ) === 0 ) { $ unit = $ u ; } else { break ; } } return [ ( int ) ( $ timeWindow / $ unit ) , $ unit , ] ; }
Get the representation of a time window expressed in seconds.

@param int $timeWindow
@param int $default the value to use if $timeWindow is not valid

@return int[] Index 0: value, index 1: units
Get the representation of a time window expressed in seconds .