Get the number of seconds the script should loop.

@return int
978547
public function getLoopTime(): int
    {
        $loop_time = $this->params->getScriptParam('l');

        if (null === $loop_time) {
            return 0;
        }

        if (\is_string($loop_time) && '' === trim($loop_time)) {
            return 604800; // Default to 7 days.
        }

        return max(0, (int) $loop_time);
    }
925249
protected function runTimers()
    {
        $now = microtime(true);
        while (($timer = array_pop($this->timers)) && $timer[0] < $now) {
            $timer[1]();
        }
        // Add the last timer back to the array.
        if ($timer) {
            $this->timers[] = $timer;

            return max(0, $timer[0] - microtime(true));
        }
    }
1049757
public function getInterval()
    {
        while (!$this->queue->isEmpty()) {
            list($timer, $timeout) = $this->queue->top();

            if (!$this->timers->contains($timer) || $timeout !== $this->timers[$timer]) {
                $this->queue->extract(); // Timer was removed from queue.
                continue;
            }

            $timeout -= microtime(true);

            if (0 > $timeout) {
                return 0;
            }

            return $timeout;
        }
        
        return null;
    }
70391
public function getWidth() : int {
        $first = $this->getStart();
        $last = $this->getEndPosition();

        return $last - $first;
    }
407842
public function calculateTimings()
    {
        if ($this->_timings === null) {
            $this->_timings = Yii::getLogger()->calculateTimings(isset($this->data['messages']) ? $this->data['messages'] : []);
        }

        return $this->_timings;
    }
1289193
public function endOfSecond()
    {
        return $this->setTime($this->hour, $this->minute, $this->second, static::MICROSECONDS_PER_SECOND - 1);
    }
211321
public function getTimestamp() : ?int 
    {
        if ( ! $this->hasTimestamp()) {
            $this->setTimestamp($this->getDefaultTimestamp());
        }
        return $this->timestamp;
    }
771042
protected function get12hHour() : int
   {

      if ( $this->isAnteMeridiem() )
      {
         return $this->getHour();
      }

      if ( $this->properties[ 'hour' ] == 0 )
      {
         return 12;
      }

      if ( $this->properties[ 'hour' ] > 12 )
      {
         return $this->properties[ 'hour' ] - 12;
      }

      return $this->properties[ 'hour' ];

   }
1177204
public function getTotalDuration(): float
    {
        $time = 0;
        foreach ($this->data['queries'] as $command) {
            $time += $command['duration'];
        }

        return $time;
    }
631431
public function getEndTime()
    {
        $count = \count($this->periods);

        return $count ? $this->periods[$count - 1]->getEndTime() : 0;
    }
994210
public function timer_diff()
    {
        $PAGELOADTIME = microtime();
        $PAGELOADTIME = explode(' ', $PAGELOADTIME);
        $PAGELOADTIME = $PAGELOADTIME[1] + $PAGELOADTIME[0];
        $now = $PAGELOADTIME;
        $TIMEDIFF = ($now - $this->basetime);

        return $TIMEDIFF;
    }
1333279
public function getDurationInMilliseconds() : float
    {
        if ($this->stoppedOn === null) {
            throw new NotStoppedException();
        }

        return $this->toMilli($this->stoppedOn - $this->startedOn);
    }
768491
public function compareTo(Duration $that) : int
    {
        $seconds = $this->seconds - $that->seconds;

        if ($seconds !== 0) {
            return $seconds > 0 ? 1 : -1;
        }

        $nanos = $this->nanos - $that->nanos;

        if ($nanos !== 0) {
            return $nanos > 0 ? 1 : -1;
        }

        return 0;
    }
908709
private static function execution_time(){
        if (self::$execution_time === 0){
            self::$execution_time = -microtime(true);
        }else{
            self::$execution_time += microtime(true);
        }
        return self::$execution_time;
    }
171909
public function getDuration() : ?float 
    {
        if ( ! $this->hasDuration()) {
            $this->setDuration($this->getDefaultDuration());
        }
        return $this->duration;
    }
289849
private static function getSeconds(): array
    {
        $seconds = [-1 => static::getConstant('TXT_DATETIME_SS', 'TXT_DATETIME_SS')];
        for ($i = 0; $i <= 59; $i++) {
            $seconds[$i] = \sprintf('%02s', $i);
        }
        return $seconds;
    }
379274
public function call(): int
    {
        $count = 0;

        while (!$this->queue->isEmpty() && (0 === $this->maxDepth || $count < $this->maxDepth)) {
            list($callback, $args) = $this->queue->shift();
            ++$count;

            if (empty($args)) {
                $callback();
            } else {
                call_user_func_array($callback, $args);
            }
        }

        return $count;
    }