Delete session that are older than the given time in secounds

@param int		$time
@return void
181129
public function gc( $time )
	{
		foreach( \CCFile::ls( \CCStorage::path( 'sessions/*' ) ) as $file )
		{
			if ( ( filemtime( $file ) - ( time() - $time ) ) < 0 )
			{
				if ( !\CCFile::delete( $file ) )
				{
					throw new Exception( "Manager_File::gc - cannot delete session file." );
				}
			}
		}
	}
894794
public static function autoclean($path, $time = -1)
    {
        $path = self::resolve($path);

        if ($path !== false && is_dir($path) && ($dh = opendir($path))) {
            if ($time < 0) {
                $time = App::env('appdata_expires');
            }

            $expires = REQUEST_TIME - $time;
            $path .= '/';

            while (false !== ($file = readdir($dh))) {
                $current = $path . $file;

                if (is_file($current) && filemtime($current) < $expires) {
                    unlink($current);
                }
            }

            closedir($dh);

            $dh = null;
        }
    }
544600
private function refresh(): void
    {
        $time = \time();

        if (isset($this->data['time']) && $this->data['time'] <= ($time - $this->expire)) {

            //delete session data
            $this->data = [];

            //regenerate session
            $this->regenerate();
        }

        $this->setSessionData($time);
    }
694067
protected function checkExceededTime($time)
    {
        $now = Carbon::now();
        $expire = Carbon::parse($time)->addMinutes(config('laravel2step.laravel2stepExceededCountdownMinutes'));
        $expired = $now->gt($expire);

        if ($expired) {
            return true;
        }

        return false;
    }
327127
public function setUpdatedAt($time)
    {
        if ($time instanceof \DateTimeInterface) {
            $time = $time->format(DATE_RFC3339);
        }

        $this->setValue('lastModified', (string) $time);
    }
1028846
private function cleanup()
    {
        if (isset($this->collection[$this->id_info])) {
            foreach ($this->collection[$this->id_info] as $key => $val) {
                $expire = $this->getSessionInfo($key, 'expire');
                if ($expire === true) {
                    $this->setSessionInfo($key, 'expire', -1);
                } elseif ($expire == -1) {
                    $this->delete($key);
                }
            }
        }
    }
283078
public function detach(Time $time)
    {
        $key = $this->search($time);

        if ($key !== false) {

            unset($this->items[$key]);
        }

        return $this;
    }
725138
public function dontSeeTimeIsInMins($time, $minutes) {
        \PHPUnit_Framework_Assert::assertNotEquals($minutes, $this->_GetNow()->diffInMinutes($this->_ParseDate($time), false));
    }
397569
public function isExpired($sessionTime) {
		
		if (is_null($this->startTime)) {
			return TRUE;
		}

		// creates expiring date subtracting sessionTime interval
		$expiring = new \DateTime(NULL, new \DateTimeZone(BASE_TIMEZONE));
		$expiring->sub(new \DateInterval('PT' . (int)$sessionTime . 'M'));
		
		return ($this->startTime < $expiring);

	}
1222722
public function setLastLoginTime(\DateTime $time = null)
	{
		if (is_null($time)) {
			$time = new \DateTime();
		}
		$this->lastLoginTime = $time;
	}
725615
public function cleanUpdate($key = '')
	{
		// No key means you want to clean em all.
		if (empty($key))
			unset($_SESSION[$this->_app->name]['update']);

		else
			unset($_SESSION[$this->_app->name]['update'][$key]);
	}
1109465
public function setDeletedAtDateTime(?DateTime $deletedAt): void
    {
        $this->deleted_at = $deletedAt === null ? null : $deletedAt->format('Y-m-d H:i:s');
    }
1231350
public function run($request)
    {
        $sessions = $this->getExpiredSessions();
        $delCount = 0;
        if ($sessions) {
            foreach ($sessions as $session) {
                $session->delete();
                $delCount++;
            }
        }
        echo $delCount . ' session records deleted that were older than '
            . $this->config()->get('session_expiry_days') . ' days.'. PHP_EOL;
    }
963826
public function setModificationTime(\DateTime $time = null)
	{
		if (is_null($time)) {
			$time = new \DateTime('now');
		}
		$this->modificationTime = $time;
	}
939336
protected function _setStorageTimeExport($time = null) {
		$time = (int)$time;
		if ($time > 0) {
			$this->_storageTimeExport = $time;
		}
	}
44830
public function delete($key) {
        if (isset($_COOKIE[$key])) {
            unset($_COOKIE[$key]);
            setcookie($key, '', time() - 3600);
        }
    }
164297
public function dontSeeTimeIsInSecs($time, $seconds) {
        \PHPUnit_Framework_Assert::assertNotEquals($seconds, $this->_GetNow()->diffInSeconds($this->_ParseDate($time), false));
    }