@param int $cpuRealtimePeriod

@return Client
762955
public function setCpuRealtimePeriod(int $cpuRealtimePeriod)
    {
        $this->cpuRealtimePeriod = $cpuRealtimePeriod;

        $this->hostConfig = array_merge($this->hostConfig, [' CpuRealtimePeriod ' => $cpuRealtimePeriod]);

        return $this;
    }
951275
public static function factory($time = null, string $timezone = null): \DateTime
    {
        if (! $timezone instanceof \DateTimeZone) {
            $timezone = $timezone ?: date_default_timezone_get();
            $timezone = new \DateTimeZone($timezone);
        }

        if ($time instanceof \DateTime) {
            return $time->setTimezone($timezone);
        }

        $datetime = new \DateTime('@' . self::timestamp($time));
        return $datetime->setTimezone($timezone);
    }
785386
public static function linearreg(array $real, int $timePeriod = null): array
    {
        $timePeriod = $timePeriod ?? 14;
        $return     = trader_linearreg($real, $timePeriod);
        static::checkForError();

        return $return;
    }
288342
public function build(): SetTimeDomainRequest
	{
		$instance = new SetTimeDomainRequest();
		if ($this->timeDomain === null) {
			throw new BuilderException('Property [timeDomain] is required.');
		}
		$instance->timeDomain = $this->timeDomain;
		return $instance;
	}
1076053
public static function sum(array $real, int $timePeriod = null): array
    {
        $timePeriod = $timePeriod ?? 30;
        $return     = trader_sum($real, $timePeriod);
        static::checkForError();

        return $return;
    }
1009985
@Override
    public Object get() throws InterruptedException, ExecutionException {
        ScheduledFuture<?> curr;
        synchronized (this.triggerContextMonitor) {
            curr = this.currentFuture;
        }
        return curr.get();
    }
116727
public function getHttpClient(): ClientInterface
    {
        if (!($this->httpClient instanceof ClientInterface)) {
            if (property_exists($this, 'app') && $this->app['http_client']) {
                $this->httpClient = $this->app['http_client'];
            } else {
                $this->httpClient = new Client(['handler' => HandlerStack::create($this->getGuzzleHandler())]);
            }
        }

        return $this->httpClient;
    }
124477
function updateCpu (cpu, next) {
  if (cpu !== null) {
    getRealUptime(function (err, uptime) {
      if (err) return next(err)
      cpu.uptime = uptime
      next(null, cpu)
    })
    return
  }

  parallel([
    getClockAndPageSize,
    getRealUptime
  ], function (err, data) {
    if (err) return next(err)

    cpu = {
      clockTick: data[0].clockTick,
      pageSize: data[0].pageSize,
      uptime: data[1]
    }

    next(null, cpu)
  })
}
672125
public function build(): GetRealtimeDataRequest
	{
		$instance = new GetRealtimeDataRequest();
		if ($this->contextId === null) {
			throw new BuilderException('Property [contextId] is required.');
		}
		$instance->contextId = $this->contextId;
		return $instance;
	}
1225547
public function setTimestamp($unixtimestamp) : \DateTime /*self invariant*/
    {
        if ($this->frozen) {
            throw new \RuntimeException(get_class($this) . ' is read-only, frozen.');
        }
        return parent::setTimestamp($unixtimestamp);
    }
721731
protected function getExecutionTime()
    {
        if ($this->executionTime === null) {
            $resource = $this->getActionExecution();

            if ($resource !== null) {
                /** @var \core_kernel_classes_Resource $resource */
                $time = (string) $resource->getOnePropertyValue(new \core_kernel_classes_Property(self::PROPERTY_EXECUTION_TIME));
                if (!empty($time)) {
                    $this->executionTime = new DateTime('@' . $time);
                }
            }
        }
        return $this->executionTime;
    }
601978
public function registerPreRequestMiddleware(IPreRequestMiddleware $middleware): IOAuthClient
    {
        $this->preRequestMiddlewares[get_class($middleware)] = $middleware;

        return $this;
    }
33009
final protected static function occurred(array $payload, ?TimeProvider $timeProvider = null)
    {
        $timeProvider = $timeProvider ?? new SystemTimeProvider();

        return new static($payload, $timeProvider->getCurrentTime());
    }
1105541
public function getRealtimeData()
    {
        $this->validateViewId();

        $this->setMetrics('rt:activeUsers');

        $data = $this->service->data_realtime->get(
            $this->viewId,
            $this->getMetricsAsString(),
            $this->getOptions()
        );

        return $data->toSimpleObject()->totalsForAllResults;
    }
1333686
public function socketSelect($timeout = 1)
    {
        if (!isset($this->queue)) {
            throw new Exception('You need to call socketPerform() before.');
        }
        return $this->queue->socketSelect($timeout);
    }
302435
public function build(): GetCurrentTimeRequest
	{
		$instance = new GetCurrentTimeRequest();
		if ($this->id === null) {
			throw new BuilderException('Property [id] is required.');
		}
		$instance->id = $this->id;
		return $instance;
	}
243905
public function getClient(): ClientInterface
    {
        if (! isset($this->client)) {
            $this->client = new GuzzleClient();
        }

        return $this->client;
    }