public function startTimelapse($filename, $interval, $length, $timeUnit = self::TIMEUNIT_SECOND)
    {
        if (empty($filename)) {
            throw new \InvalidArgumentException('Filename required');
        }

        $this->valueArguments['output'] = $filename;

        $this->timeout($length, $timeUnit);
        $this->timelapse($interval, $timeUnit);

        $this->execute(
            $this->buildCommand()
        );
    }
public function startTimelapse($filename, $interval, $length, $timeUnit = self::TIMEUNIT_SECOND)
    {
        if (empty($filename)) {
            throw new \InvalidArgumentException('Filename required');
        }

        $this->valueArguments['output'] = $filename;

        $this->timeout($length, $timeUnit);
        $this->timelapse($interval, $timeUnit);

        $this->execute(
            $this->buildCommand()
        );
    }
public function startTimelapse ( $ filename , $ interval , $ length , $ timeUnit = self :: TIMEUNIT_SECOND ) { if ( empty ( $ filename ) ) { throw new \ InvalidArgumentException ( 'Filename required' ) ; } $ this -> valueArguments [ 'output' ] = $ filename ; $ this -> timeout ( $ length , $ timeUnit ) ; $ this -> timelapse ( $ interval , $ timeUnit ) ; $ this -> execute ( $ this -> buildCommand ( ) ) ; }
Take pictures with timelapse mode.

Note you should specify %04d at the point in the filename where you want a frame count number to appear.
e.g. 'image%04d.jpg'. Note that the %04d indicates a 4 digit number with leading zero's added to pad to the
required number of digits. So, for example, %08d would result in an 8 digit number.

If a timelapse value of 0 is entered, the application will take pictures as fast as possible. Note there is an
minimum enforced pause of 30ms between captures to ensure that exposure calculations can be made.

Time unit can be one of: `Raspicam::TIMEUNIT_MINUTE`, `Raspicam::TIMEUNIT_SECOND`,
`Raspicam::TIMEUNIT_MILLISECOND`, `Raspicam::TIMEUNIT_MICROSECOND`.

**Example:**
```php
// take picture every ten seconds for two minutes
$camera->startTimelapse('image%04d.jpg', 10, 120);
```

@param string    $filename
@param int|float $interval Time between shots.
@param int|float $length   Time how long to keep taking pictures.
@param string    $timeUnit Optional. Time unit for $interval and $length. Default: `Raspicam::TIMEUNIT_SECOND`
Take pictures with timelapse mode .