This function returns the time that has passed between when start() was
called and when stop() was called in seconds (S).

@return float
435511
public function getElapsedTimeInSeconds()
    {
        if(!$this->_timeStartInMicroSeconds)
        {
            return 0;
        }

        $microSecsStart = $this->_timeStartInMicroSeconds;
        $microSecsStop = $this->_timeStopInMicroSeconds;

        if($microSecsStop == 0)
        {
            // The function stopTimer was not called.
            $microSecsStop = microtime(true);
        }

        $seconds = $microSecsStop - $microSecsStart;

        return round($seconds, 4);
    }
861193
public function getRemaining()
    {
        $speed = $this->getSpeed();
        $notHandledCount = $this->all - $this->handled;

        $remainingSeconds = $speed != 0 ? $notHandledCount / $speed : $notHandledCount;

        return round($remainingSeconds);
    }
352604
protected static function getTime() {
		$mtime = microtime();
		$mtime = explode(" ",$mtime); 
		$mtime = $mtime[1] + $mtime[0]; 
		return $mtime;
	}
424428
public function getDtEnd()
    {
        if (!$this->valid()) {
            return;
        }
        $end = clone $this->currentDate;

        return $end->modify('+'.$this->eventDuration.' seconds');
    }
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;
    }
44050
public function getStartTime() {
        if (!isset($this->startTime)) {
            $this->startTime = (string)$this->getData(OntologyDeliveryExecution::PROPERTY_TIME_START);
        }
        return $this->startTime;
    }
86501
public function getDuration($from = Timer::START, $to = Timer::STOP) {
        $from = $this->getCheckpoint($from);
        $to = $this->getCheckpoint($to);

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

        if ($to === null) {
            $to = microtime(true);
        }

        return abs($to - $from);
    }
174289
public function toSeconds()
    {
        $seconds = $this->s;
        $seconds += $this->i * 60;
        $seconds += $this->h * 3600;
        
        if ($this->days) {
            $seconds += $this->days * 86400;
        } else {
            if ($this->d) {
                $seconds += $this->d * 86400;
            }
            if ($this->m) {
                trigger_error('Calculating seconds for interval with months property. Result may not be accurate.', E_USER_WARNING);
                $seconds += 2629800;
            }
            if ($this->y) {
                trigger_error('Calculating seconds for interval with years property. Result may not be accurate.', E_USER_WARNING);
                $seconds += $this->y * 31557600;
            }
        }
        return $seconds;
    }
1297956
static public function get_time() {
        // By David Maciel (jdmaciel@gmail.com)
        list($microsecond, $second) = explode(" ", \microtime());
        // remove '0.' from the beginning and trailing zeros(2) from the end
        $microsecond = substr($microsecond, 2, -2);
        return (int) $second . $microsecond;
    }
1013512
public function getTime()
    {
        $time = 0;
        foreach ($this->data['queries'] as $query) {
            if (array_key_exists('took', $query['response'])) {
                $time += $query['response']['took'];
            }
        }

        return $time;
    }
965467
public function getDuration()
    {
        if (!isset($this->data['events']['__section__'])) {
            return 0;
        }

        $lastEvent = $this->data['events']['__section__'];

        return $lastEvent->getOrigin() + $lastEvent->getDuration() - $this->getStartTime();
    }
310354
public function getTotalTimestampInterval(): float
    {
        $retval = 0;
        foreach ($this->intervals as $interval) {
            $retval += $interval->getTimestampInterval();
        }

        return $retval;
    }
241114
protected function getMinutes()
    {
        $intSecondsPerMinute = ($this->isPositive()) ? DateTimeSpan::SECONDS_PER_MINUTE : ((-1) * DateTimeSpan::SECONDS_PER_MINUTE);
        $intMinutes = floor($this->intSeconds / $intSecondsPerMinute);
        if ($this->isNegative()) {
            $intMinutes = (-1) * $intMinutes;
        }
        return $intMinutes;
    }
996125
public static function start_timer() {
		$time = microtime();
		$time = explode(' ', $time);
		$time = $time[1] + $time[0];
		return $time;
	}
1200537
public function getDuration() : float
    {
        if ($this->stoppedOn === null) {
            throw new NotStoppedException();
        }

        return $this->toMicro($this->stoppedOn - $this->startedOn);
    }
82156
public function getCanResendTime()
    {
        $key = $this->generateKey(self::CAN_RESEND_UNTIL_KEY);

        return (int) self::storage()->get($key, 0);
    }
1190836
public static function page_time(){
		$mtime = explode(' ', microtime());
		$totaltime = $mtime[0] + $mtime[1] - self::$starttime;
		return $totaltime;
		}